Frictional Games Forum (read-only)
monster Despawn - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+--- Thread: monster Despawn (/thread-53600.html)



monster Despawn - XeOnTricks - 02-26-2017

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?


RE: monster Despawn - FlawlessHappiness - 02-26-2017

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



RE: monster Despawn - Mudbill - 02-26-2017

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).


RE: monster Despawn - XeOnTricks - 02-27-2017

okay thank you! Smile