The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Messages In This Thread
Need help with CheckPoint function - by LowFire3 - 12-15-2010, 05:45 AM



Users browsing this thread: 1 Guest(s)