Frictional Games Forum (read-only)
Prevent monsters from expiring - 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)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Prevent monsters from expiring (/thread-9526.html)



Prevent monsters from expiring - Your Computer - 08-01-2011

After some testing i realized that monsters tend to automatically expire when the user is at a certain distance after having come near the area where the monster is at. This is undesirable for my custom story. Is it possible to have the monster's life exist "forever"?


RE: Prevent monsters from expiring - Your Computer - 08-01-2011

My current workaround is constantly activating the monster entity, but i'm hoping to find a better way of keeping the monster alive. I am not sure what the consequences of constantly setting the entity to an active state are.


RE: Prevent monsters from expiring - palistov - 08-01-2011

If they have no patrol path and are too far from the player they de-activate. To counter this, have it repeatedly being re-assigned a patrol path by using collide callbacks with areas.


RE: Prevent monsters from expiring - Your Computer - 08-01-2011

(08-01-2011, 05:48 PM)palistov Wrote: If they have no patrol path and are too far from the player they de-activate. To counter this, have it repeatedly being re-assigned a patrol path by using collide callbacks with areas.
So even though the function has the word "patrol" in it, the path node gets automatically removed from the monster's, uh, "destination memory" upon reaching the point?


RE: Prevent monsters from expiring - DRedshot - 08-01-2011

a decent solution is to click on your monster, then look at the callbacks. Then use the first callback (i think its just called callback) then add a function in your hps

void Callback(string &in asEntity , string &in asType)
{
if(asType=="AutoDisable"){
SetEntityActive("Monster" , true);
}
}

The description tells you what 'asType' can be, but i cant remember it's exact name.

This will just spawn the monster if it's disabled. Maybe go into the model editor and remove the enabled sound if it plays too often


RE: Prevent monsters from expiring - Your Computer - 08-01-2011

(08-01-2011, 07:13 PM)DRedshot Wrote: a decent solution is to click on your monster, then look at the callbacks. Then use the first callback (i think its just called callback) then add a function in your hps
This appears to be causing performance issues for me, cutting my frames in half. Apparently, as the debugging messages (that scroll to the top of the screen) imply, the monster is being automatically disabled constantly. It seems i'm going to have to deal with collisions.