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
Making an enemy not despawn after dying
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#3
RE: Making an enemy not despawn after dying

(04-03-2012, 11:05 AM)heyitsrobert97 Wrote: you could create a checkpoint
{
CheckPoint ("checkpoint1", "playerstart_2", "enemykill", "", "";
}

void enemykill(string &in asName, int alCount)

{
SetEntityActive("monster2", true);
SetEntityActive("monster", false);

}

Then Create another monster called monster2 and set him as inactive.
so the callback will set that monster active when you die.and the false one will
delete the first monster if he stayed spawned
That seems like a finite list. Sure, if you make ten monsters and number them 1-10, the players won't bother dying ten times over, but it's not an ideal solution.
A hunch: Does "SetEntityActive("monster", true);" after death, make the monster respawn in its spawn position?


Noob scripting tutorial: From Noob to Pro

04-03-2012, 11:14 AM
Find


Messages In This Thread
RE: Making an enemy not despawn after dying - by Cranky Old Man - 04-03-2012, 11:14 AM



Users browsing this thread: 1 Guest(s)