Frictional Games Forum (read-only)
[SCRIPT] Gent will stop mid path - 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: [SCRIPT] Gent will stop mid path (/thread-53383.html)



Gent will stop mid path - Demonbrant - 12-07-2016

I had recently wanted a gent npc to follow a path, and it stops mid path. Then at a certain point it just disappears. I really need help with this or else i cant have random people in the streets just walking past. I also get the sanity effect from looking at them when i disabled sanity. How can i disable this with the certain enemy?


RE: Gent will stop mid path - Romulator - 12-08-2016

Use either of these. The first should disable everything, and the latter will disable it for a single enemy (the gent).

PHP Code:
SetSanityDrainDisabled(bool abX);
SetEnemySanityDecreaseActive(string &in asNamebool abX); 

For the former problem (disappearing suddenly). If the player is too far away, or an enemy has hit its last pathnode and the player is not looking, they automatically disappear. You can change these settings in the Model Editor in the User Defined Variables for the gent model. I'm pretty certain they're right down the bottom; increase the max distance and there's a checkbox option for disappearing at the pathnode end if I recall.

Make sure also to disable the triggers for the gent. Otherwise, if it sees the player, it will go into Hunt mode, but will just be idle.


RE: Gent will stop mid path - Demonbrant - 12-08-2016

(12-08-2016, 03:17 AM)Romulator Wrote: Use either of these. The first should disable everything, and the latter will disable it for a single enemy (the gent).

PHP Code:
SetSanityDrainDisabled(bool abX);
SetEnemySanityDecreaseActive(string &in asNamebool abX); 

For the former problem (disappearing suddenly). If the player is too far away, or an enemy has hit its last pathnode and the player is not looking, they automatically disappear. You can change these settings in the Model Editor in the User Defined Variables for the gent model. I'm pretty certain they're right down the bottom; increase the max distance and there's a checkbox option for disappearing at the pathnode end if I recall.

Make sure also to disable the triggers for the gent. Otherwise, if it sees the player, it will go into Hunt mode, but will just be idle.

Thank you, this works! Smile


RE: Gent will stop mid path - Romulator - 12-08-2016

Glad to help Smile Best of luck with the mod!