![]() |
[SCRIPT] help needed - 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] help needed (/thread-21178.html) |
help needed - Corpus - 04-15-2013 I've been working on a script to turn off the lamps in a hallway, but unfortunately when I enter the script area nothing happens. I've checked the common "name" error and syntax but I cant seem to solve this especially since I'm a scripting noob. Here's my .hps script. Any help would be appreciated. void OnStart() { AddEntityCollideCallback("", "KillTheLights", "LightsOut", true, 1); } void LightsOut(string &in asParent, string &in asChild, int alState) { SetLampLit("torch1", false, true); AddTimer("", 2, "Out2"); } void Out2(string &in asTimer) { SetLampLit("torch2", false, true); AddTimer("", 2, "Out3"); } void Out3(string &in asTimer) { SetLampLit("torch3", false, true); AddTimer("", 2, "Out4"); } void Out4(string &in asTimer) { SetLampLit("torch4", false, true); AddTimer("", 2, "Out5"); } void Out5(string &in asTimer) { SetLampLit("torch5", false, true); AddTimer("", 2, "Out6"); } void Out6(string &in asTimer) { SetLampLit("torch6", false, true); AddTimer("", 2, "Out7"); } void Out7(string &in asTimer) { SetLampLit("torch7", false, true); AddTimer("", 2, "Out8"); } void Out8(string &in asTimer) { SetLampLit("torch8", false, true); AddTimer("", 2, "Out9"); } void Out9(string &in asTimer) { SetLampLit("torch9", false, true); AddTimer("", 2, "Out10"); } void Out10(string &in asTimer) { SetLampLit("torch10", false, true); } void OnEnter() { } void OnLeave() { } RE: help needed - Statyk - 04-15-2013 AddEntityCollideCallback("", "KillTheLights", "LightsOut", true, 1); You have nothing activating the script. Do this: AddEntityCollideCallback("Player", "KillTheLights", "LightsOut", true, 1); |