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 true
layer 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