![]() |
[SCRIPT] SetEntityActive help?! - 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] SetEntityActive help?! (/thread-14042.html) |
SetEntityActive help?! - Mojake - 03-16-2012 I'm trying to make a statue appear as the player enters an area, however the statue always remains in map before I've even reached the area... The entity is definitely set as inactive. Also, when I put a PlayerLookAt function to look at the statue; it doesn't look at the statue and just gives sanity damage. Here's my script: //////////////////////////// // Run first time starting map void OnStart() { AddUseItemCallback("", "Crowbar", "mansion_1", "Break", true); AddEntityCollideCallback("Player", "ScriptArea_1", "mansion_1", true, 1); AddEntityCollideCallback("Player", "ScriptArea_2", "StartMusic_1", true, 1); AddEntityCollideCallback("Player", "ScriptArea_3", "StatueAppear", true, 1); AddEntityCollideCallback("Player", "ScriptArea_4", "StatueShock", true, 1); } ////////Openmansion_1//////// void Break(string &in asItem, string &in asEntity) { SetSwingDoorLocked("mansion_1", false, true); PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false); RemoveItem("Crowbar"); } ////////DoorSlam//////// void mansion_1(string &in asParent, string &in asChild, int alState) { SetSwingDoorClosed("mansion_1", true, true); PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false); GiveSanityDamage(10.0f, true); SetPlayerActive(false); StartPlayerLookAt("mansion_1", 3.0f, 5.0f, ""); AddTimer("timer01", 1.5f, "StopLook"); } void StopLook(string &in asTimer) { StopPlayerLookAt(); SetPlayerActive(true); } ////////Music_1//////// void StartMusic_1(string &in asParent, string &in asChild, int alState) { PlayMusic("ambience_swoop_myst.ogg", true, 0.2, 2, 1, true); } ////////StatueAppear//////// void StatueAppear(string &in asParent, string &in asChild, int alState) { SetEntityActive("deformed_man_1", true); } void StatueShock(string &in asParent, string &in asChild, int alState) { SetPlayerActive(false); StartPlayerLookAt("deformed_man_1", 3.0f, 5.0f, ""); AddTimer("timer01", 1.5f, "StopLookStatue"); GiveSanityDamage(20.0f, true); PlaySoundAtEntity("", "scare_male_terrified3.ogg", "Player", 0, false); } void StopLookStatue(string &in asTimer) { StopPlayerLookAt(); SetPlayerActive(true); } Eternal gratitude to whoever can sort this out for me! ![]() RE: SetEntityActive help?! - flamez3 - 03-17-2012 Statues like that can't be disabled. |