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
Getting a Monster to respawn after death
Cyphermur9t Offline
Junior Member

Posts: 38
Threads: 17
Joined: Jan 2013
Reputation: 2
#1
Getting a Monster to respawn after death

Basically what it says. I'm trying to get certain functions to be triggered again after death. I have this chase scene where everything works correctly, but there's no point in having it where if the player dies there's no chase when he respawns. So I pretty much want FUNCTION16 and everything that goes with it to start over again.

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_13", "FUNCTION16", true, 1); //final chase starts
}

//////////FINAL CHASE//////////
void FUNCTION16(string &in asParent, string &in asChild, int alState)
{
    SetPlayerActive(false);
    PlaySoundAtEntity("","suitoridle.snt", "servant_suitor_5", 0, false);
    StartPlayerLookAt("servant_suitor_5", 5, 5, "");
    AddTimer("timer1", 2.5f, "final_chase_2");
    StartScreenShake(0.1, 0.16, 0.10,0.10);
    SetMoveObjectState("castle_portcullis_2", 0);
}

void final_chase_2(string &in asTimer)
{
    PlayMusic("Music_Junkies_Brutal.ogg", true, 6, 0, 9, false);
    StartPlayerLookAt("servant_suitor_5", 6, 6, "");
    AddTimer("timer1", 3.8f, "final_chase_3");
}

void final_chase_3(string &in asTimer)
{
    SetMessage("Messages", "Run" , 2.5f);
    StartPlayerLookAt("Look5", 6, 6, "");
    AddTimer("timer1", 1.5f, "final_chase_4");
    SetPropHealth("castle_12", 0.0f);
}

void final_chase_4(string &in asTimer)
{
    SetEntityActive("servant_suitor_5", true);
    AddEnemyPatrolNode("servant_suitor_5", "PathNodeArea_43", 0.0f, "");
    ShowEnemyPlayerPosition("servant_suitor_5");
    StopPlayerLookAt();
    SetPlayerActive(true);
}

//////////RESTART FINAL CHASE AFTER DEATH//////////
void Restart(string &in asParent, string &in asChild, int alState)
{
    CheckPoint ("checkpoint1", "PlayerStartArea_2", "servant_suitor_5", "DeathCategory", "Deathtext1");
}
02-11-2013, 05:01 AM
Find


Messages In This Thread
Getting a Monster to respawn after death - by Cyphermur9t - 02-11-2013, 05:01 AM



Users browsing this thread: 1 Guest(s)