Frictional Games Forum (read-only)

Full Version: AreaHelp?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Im making a test map using this tutorial and it says something about a AreaHelp. Where do i find that in the level editor?

http://wiki.frictionalgames.com/hpl2/tut...tutorial_1
AreaHelp is just the name of the function

AddEntityCollideCallback("Player","AreaHelp","CollidePlayerWithAreaHelp<--- Function Name");

It can be whatever you want.
(03-19-2011, 06:08 PM)Viperdream Wrote: [ -> ]AreaHelp is just the name of the function

AddEntityCollideCallback("Player","AreaHelp","CollidePlayerWithAreaHelp<--- Function Name");

It can be whatever you want.

can you show me a example.
I'll just copy this from one of my scripts:

Code:
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