I set up a checkpoint on my map that is suppose to spawn me in another location if i die, and this works fine, however, i've been having some trouble figuring something out.
I've coded my checkpoint so that when you do die, it sets a deactivated script area to active, unfortunately, it doesn't work.
void ChemicalBlueMonster(string &in asParent,string &in asChild, int alState)
{
if(HasItem("chemical_blue") == true)
{
AddTimer("",1.0f,"ChemScareDelay");
AddTimer("react_scare.snt",0.4f,"ChemScareFreak");
SetEntityActive("ChemGrunt",true);
RemoveEntityCollideCallback("Player","ChemicalBlueTrigger");
CheckPoint("","DeathRestart2","GruntFailFunction","DeathHints","DeathRestartHint1");
}
}
void ChemScareDelay(string &in asTimer)
{
GiveSanityDamage(20.0f,true);
}
void ChemScareFreak(string &in asTimer)
{
PlaySoundAtEntity("","react_scare.snt","Player",0,false);
}
void GruntFailFunction()
{
SetEntityActive("GruntFailCollide",true);
}
//CODE FOR MONSTER AFTER DEATH FROM CHEM MONSTER//
void ChemGruntFail(string &in asParent,string &in asChild, int alState)
{
SetEntityActive("GruntFail",true);
SetEnemyIsHallucination("GruntFail",true);
RemoveEntityCollideCallback("Player","GruntFailCollide");
}
EDIT: I guess my main question here is what to put in the asCallback part of the Checkpoint function. I know what a callback is, but I'm still not entirely sure what exactly i'm suppose to put there.
Btw, here is the function: CheckPoint(string& asName,string& asStartPos ,string& asCallback, string &asDeathHintCat, string &asDeathHintEntry);
I hope i explained my problem as clearly as possible. Any help would be appreciated.
Thanks.