Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AreaHelp?
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#4
RE: AreaHelp?

I'll just copy this from one of my scripts:

AddEntityCollideCallback("uberhammer", "UseHammerArea", "Collide_Smash", true, 1);
//Put this at OnStart() ubberhammer is the entity that has to collide to activate the area, this can also be the player. UseHammerArea is the name of that Area in the level editor, Collide_Smash is the function (below) that activates when the entity collides with the area. True means that it gets removed after the entity collides with the Area(meaning it won't activate again) and 1 means that the entity has to be inside the area to activate it. -1 is when the entity goes out of the area to activate.

void Collide_Smash(string &in asParent, string &in asChild, int alState)    
//This is the function that gets activated after the entity collides with the Area. Just put the name of the function after the void. The rest is just copy paste.
{
//Put stuff you want to get done /here between the{}
FadeOut(1.0f);
AddTimer("PlaySound1", 1.5f, "PlaySound1Timer");
AddTimer("PlaySound2", 2.0f, "PlaySound2Timer");
AddTimer("FadeIn", 2.1f, "FadeInTimer1");
}

I hope that this makes it clear for you Smile

(This post was last modified: 03-19-2011, 09:04 PM by Viperdream.)
03-19-2011, 09:03 PM
Find


Messages In This Thread
AreaHelp? - by ZxBrad - 03-19-2011, 05:28 PM
RE: AreaHelp? - by Viperdream - 03-19-2011, 06:08 PM
RE: AreaHelp? - by ZxBrad - 03-19-2011, 07:16 PM
RE: AreaHelp? - by Viperdream - 03-19-2011, 09:03 PM



Users browsing this thread: 1 Guest(s)