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
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Getting a Monster to respawn after death

How about having function16 call another function like this:

void FUNCTION16(string &in asParent, string &in asChild, int alState)
{
CheckPoint ("checkpoint1", "PlayerStartArea_2", "RespawnFunction", "DeathCategory", "Deathtext1");

MonsterFunction();
}


void MonsterFunction()
{
if(GetLocalVarInt("MonsterTimes") == 1)
{
SetEntityActive("servant_suitor_5", true);
}

if(GetLocalVarInt("MonsterTimes") == 2)
{
SetEntityActive("servant_suitor_6", true);
}

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);
}


Now you will need 2 monsters. 1 for the first time, and the second monster for all the other times.
So when colliding with Function16, SetLocalVarInt("MonsterTimes", 1);And then when respawning, SetLocalVarInt("MonsterTimes", 2);

This is the checkpoint:

void RespawnFunction(string &in asName, int alCount)
{
MonsterFunction();
}

Trying is the first step to success.
(This post was last modified: 02-11-2013, 08:24 AM by FlawlessHappiness.)
02-11-2013, 08:23 AM
Find


Messages In This Thread
RE: Getting a Monster to respawn after death - by FlawlessHappiness - 02-11-2013, 08:23 AM



Users browsing this thread: 1 Guest(s)