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?
ZxBrad Offline
Member

Posts: 140
Threads: 29
Joined: Mar 2011
Reputation: 0
#1
AreaHelp?

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

WARNING: Noob Doesn't Know How To Script.
[Image: xcn384.gif]

03-19-2011, 05:28 PM
Find
Viperdream Offline
Member

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

AreaHelp is just the name of the function

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

It can be whatever you want.

(This post was last modified: 03-19-2011, 06:08 PM by Viperdream.)
03-19-2011, 06:08 PM
Find
ZxBrad Offline
Member

Posts: 140
Threads: 29
Joined: Mar 2011
Reputation: 0
#3
RE: AreaHelp?

(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.

WARNING: Noob Doesn't Know How To Script.
[Image: xcn384.gif]

03-19-2011, 07:16 PM
Find
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




Users browsing this thread: 1 Guest(s)