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
Enemies Disappear
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#8
RE: Enemies Disappear

I'll make this simple!

When player comes from where ever to the area where you trigger something that can kill the player, you can put
CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);

example script:
///////////////
void OnStart()
{AddEntityCollideCallback("Player", "ScriptArea_1", "KillPlayer", true, 1);}
//////////////
void KillPlayer(string &in asParent, string &in asChild, int alState)
{CheckPoint ("blehblah", "PlayerStartArea_1, "DoSomething", "", "");
GivePlayerDamage(666.0f, "Slash", true, true);
}
//////////////
void DoSomething(string &in asName, int alCount)
{AddEntityCollideCallback("Player", "ScriptArea_1", "KillPlayer", true, 1);}


That would kill the player again and again if he steps into one area.
When AddEntityCollideCallback's
abDeleteOnCollide - determines whether the callback after it was called
is trueTonguelayer triggers the callback when he enters the area only once.
So checkpoint makes sure that callback is called again after its been triggered once already

It works fine with SetEntityActive("yourgruntsname", true); and patrolnodes
(This post was last modified: 07-10-2011, 09:31 PM by Khyrpa.)
07-10-2011, 09:30 PM
Find


Messages In This Thread
Enemies Disappear - by convolution223 - 07-08-2011, 06:53 PM
RE: Enemies Disappear - by Paulpolska - 07-08-2011, 07:06 PM
RE: Enemies Disappear - by convolution223 - 07-08-2011, 09:34 PM
RE: Enemies Disappear - by convolution223 - 07-09-2011, 05:22 AM
RE: Enemies Disappear - by crosser3x - 07-09-2011, 10:13 PM
RE: Enemies Disappear - by Im_Sexy - 07-10-2011, 12:18 AM
RE: Enemies Disappear - by AlexRobillard - 07-10-2011, 08:51 PM
RE: Enemies Disappear - by Khyrpa - 07-10-2011, 09:30 PM
RE: Enemies Disappear - by Im_Sexy - 07-11-2011, 09:52 PM



Users browsing this thread: 2 Guest(s)