Frictional Games Forum (read-only)

Full Version: monster Despawn
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
as i was creating my custom story i was trying to figure out how to stop a monster from disappearing after a player dies. can someone give my a script or tell me what i need to do?
Before the player dies, you must set a checkpoint

PHP Code:
CheckPoint (stringasNamestringasStartPosstringasCallbackstringasDeathHintCatstringasDeathHintEntry); 

Here you specify at what StartPos the player is going to respawn, and you also specify a callback. You're going to use this callback to set the enemy active again. I'm not sure whether you have to place a secondary inactive enemy that you're going to set active, or if you can use the first one.
You're going to have to experiment with that.

The syntax for the checkpoint callback is

PHP Code:
void MyFunc(string &in asNameint alCount
You can use SetEntityActive on the original monsters and they will spawn again in the original position after death (I was actually surprised about this when I found out).
okay thank you! Smile