Frictional Games Forum (read-only)

Full Version: Enemy "Disappears" on Death
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone!

I'm trying my hand at making a custom story for Amnesia, and everything works...mostly. I have one problem where if I go to the map with a water lurker in it, if it kills me it will not be there when I respawn. How can I fix this? Also, I have one more issue where I have an area set to make an entity active and play a sound when the player walks into it, and if I go to a different map and then back, the entity is still there, but the sound plays again if I walk into the area; this problem is not seen if I don't leave the map (the area deletes itself like it should).

Thanks to anyone that can help!
When you add the checkpoint (which you should definitely have if the player can die soon, especially at a monster) the function allows you to call another function when you die. You can use that to reset the water lurker by calling the original a new function with the callback syntax below:

CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);


Callback syntax: void MyFunc(string &in asName, int alCount)



Sorry, but I can't help you with the second part of your problem because I'm not 100% sure if I understand what you're asking.
(05-26-2012, 05:35 AM)andyrockin123 Wrote: [ -> ]When you add the checkpoint (which you should definitely have if the player can die soon, especially at a monster) the function allows you to call another function when you die. You can use that to reset the water lurker by calling the original a new function with the callback syntax below:

CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);


Callback syntax: void MyFunc(string &in asName, int alCount)



Sorry, but I can't help you with the second part of your problem because I'm not 100% sure if I understand what you're asking.
Okay, thanks! I'll try that tomorrow; it's almost 1 AM here, and I'm tired Smile
(05-26-2012, 05:30 AM)iTech278 Wrote: [ -> ]Also, I have one more issue where I have an area set to make an entity active and play a sound when the player walks into it, and if I go to a different map and then back, the entity is still there, but the sound plays again if I walk into the area; this problem is not seen if I don't leave the map (the area deletes itself like it should).
Did you place the callback for that area in OnEnter()? If it is, place the callback in OnStart() instead.

If you really want it foolproof, create the callback after the player does something (pick up a key, etc.) and have that something be only done once. This may or may not be possible for your situation.
(05-26-2012, 05:35 AM)andyrockin123 Wrote: [ -> ]When you add the checkpoint (which you should definitely have if the player can die soon, especially at a monster) the function allows you to call another function when you die.
Okay...would I reset the water lurker by putting this in the function called on death?
Code:
SetEntityActive("SewerMonster", true);

I don't think that's right as it didn't work, so what should I call? Sorry, I'm new to this Undecided
If I'm not mistaken you need more waterlurkers since you can't respawn the first lurker. so you need another one that is inactive untill it's activated through the checkpoint callback
(05-26-2012, 06:55 PM)SilentStriker Wrote: [ -> ]If I'm not mistaken you need more waterlurkers since you can respawn the first lurker. so you need another one that is inactive untill it's activated through the checkpoint callback
Thanks, that worked!