[SOLVED]Script won't work - 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: [SOLVED]Script won't work (/thread-15688.html) |
[SOLVED]Script won't work - FlawlessHappiness - 05-28-2012 void OnStart() { AddEntityCollideCallback("Player", "ScriptArea_1", "OnPlayerCollide_1", true, 1); } void OnPlayerCollide_1(string &in asParent, string &in asChild, int alState) { StartScreenShake(3, 5, 1, 0.1); AddTimer("", 2, "Rock_timer"); } void Rock_timer(string &in asTimer) { SetEntityActive("stone_med01_brown_8", true); StartPlayerLookAt("stone_med01_brown_8", 10, 10, ""); PlaySoundAtEntity("", "break_stairs", "stone_med01_brown_8", 0, false); PlaySoundAtEntity("", "react_pant", "Player", 0, false); } void OnEnter() { } void OnLeave() { } Why doesn't this work?? I don't get it. Most of it is copied, and with changed names. I tried highlighting the different names, and everything seems to be as it should. But nothing happens when i collide with the script area. I've tried copying the name of the area from the editor to the script. Still no luck. I get no error... just nothing happens. EDIT: Ok i now tried to set a message, when you start the level. Nothing happens. Apparently the level and the script aren't working together. But they have identical names (Except for the .map and .hps) Spoiler below!
EDIT2: Okay i don't know what i did, but i deleted the script, made a new one, exactly the same, restarted amnesia, and now it works... RE: Script won't work - Xanthos - 05-28-2012 So no error message pops up now? RE: Script won't work - FlawlessHappiness - 05-28-2012 There never was... Just nothing happened. The script and the level didn't connect. But its solved now.... |