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
Need help with CheckPoint function
LowFire3 Offline
Junior Member

Posts: 26
Threads: 4
Joined: Dec 2010
Reputation: 1
#1
Need help with CheckPoint function

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

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. Big Grin

[Image: at_7728609.png]
(This post was last modified: 12-15-2010, 04:53 PM by LowFire3.)
12-15-2010, 05:45 AM
Find
Stangi Offline
Junior Member

Posts: 25
Threads: 3
Joined: Oct 2010
Reputation: 0
#2
RE: Need help with CheckPoint function

Looks to me like you forgot the callback syntax after
Quote:void GruntFailFunction()
{
SetEntityActive("GruntFailCollide",true);
}

It should be
Quote:void GruntFailFunction(string &in asName, int alCount)
{
SetEntityActive("GruntFailCollide",true);
}

Or at least I think so... Blush
(This post was last modified: 12-15-2010, 10:54 PM by Stangi.)
12-15-2010, 09:30 PM
Find
LowFire3 Offline
Junior Member

Posts: 26
Threads: 4
Joined: Dec 2010
Reputation: 1
#3
RE: Need help with CheckPoint function

(12-15-2010, 09:30 PM)Stangi Wrote: Looks to me like you forgot the callback syntax after
Quote:void GruntFailFunction()
{
SetEntityActive("GruntFailCollide",true);
}

It should be
Quote:void GruntFailFunction(string &in asName, int alCount)
{
SetEntityActive("GruntFailCollide",true);
}

Or at least I think so... Blush

That worked. Thanks a bunch. Smile

[Image: at_7728609.png]
12-16-2010, 04:07 AM
Find




Users browsing this thread: 2 Guest(s)