[SCRIPT] SetPlayerActive(false/true) Problems.& Grunt Question - 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] SetPlayerActive(false/true) Problems.& Grunt Question (/thread-23887.html) |
SetPlayerActive(false/true) Problems.& Grunt Question - Rob21894 - 11-18-2013 void OnStart() { AddEntityCollideCallback("Player","lookatmonster","lookat", true, 1); } void lookat(string &in asParent, string &in asChild, int alState) { StartPlayerLookAt("look1", 1.0f, 1.0f, ""); SetPlayerActive(false); AddTimer("", 5, ""); SetPlayerActive(true); } When i remove the "SetPlayerActive(true); It works perfectly, but then i can't control the player, But if i add it as shown above, it doesnt become unactive, why is this? 2. Grunts, Is there a way to turn there vision down/off? So they're blind and only go after sound? RE: SetPlayerActive(false/true) Problems. - Romulator - 11-18-2013 What you have done is sort of correct. The way in which a timer works is that when it is activated, it counts upward in seconds, and when it reaches the appropriate time (which you have declared as 5 seconds), it runs a function which is declared from the third set of quotation marks. This should work correctly. PHP Code: void lookat(string &in asParent, string &in asChild, int alState){ |