![]() |
Enemy hallucinate event - 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: Enemy hallucinate event (/thread-53959.html) |
Enemy hallucinate event - User01 - 11-24-2017 Hi I'm trying to check wheter an enemy disappears by hallucination. GetEntityExists doesn't seems to work, the entity might be still active after the vanish. I did something like this: PHP Code: void enemy(string &in asTimer) I don't know how GetEnemyStateName should work. RE: Enemy hallucinate event - User01 - 12-03-2017 Anyone? RE: Enemy hallucinate event - Red - 12-03-2017 The function only appears to be meant to check if the entity is active. Not the other way around, strangely. EDIT: If you want something to happen if the enemy disables, use the "OnAutoDisable" function. That's the furthest thing I can come up with. RE: Enemy hallucinate event - Darkfire - 12-04-2017 You could mathematically count the distance between the Player and the monster by using looping timers, GetEntityPosition and GetPlayerPosition (and Pythagorean Theorem), I guess you could skip the Y dimension for simplicity. Then call SetEnemyIsHallucination or FadeEnemyToSmoke when it gets too close, and at the same time change a GlobalVariable, which would serve as an indicator of the fact whether the enemy is faded to smoke. It's kind of an overshot for the effect you need, but I'm 99% sure it would work. |