enemy dissapear after looking at him? - 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: enemy dissapear after looking at him? (/thread-21799.html) |
enemy dissapear after looking at him? - 39Games - 06-11-2013 I want to save a scare in my custom story that has an enemy, when you look at it, a few seconds later it dissapears, what would the code be? I have not worked with if looking/not looking or what ever it is... RE: enemy dissapear after looking at him? - FlawlessHappiness - 06-11-2013 I will give you a few lines to work with. Lets see if you can figure it out SetEntityPlayerLookAtCallback("", "EnemyLookAtDisappear", false); void EnemyLookAtDisappear(string &in asEntity, int alState) { if(alState == 1) { } if(alState == -1) { } } AddTimer("EnemyDisappearTimer", 2, "EnemyDisappearTimer"); RemoveTimer("EnemyDisappearTimer"); SetEntityActive("Enemy", false); void EnemyDisappearTimer(string &in asTimer) { } Also, this should've been posted in Development support. http://www.frictionalgames.com/forum/forum-39.html Remember that next time RE: enemy dissapear after looking at him? - 39Games - 06-11-2013 Works mate, thanks! |