![]() |
HELP - SCRIPTING D: - 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: HELP - SCRIPTING D: (/thread-13451.html) |
HELP - SCRIPTING D: - stinset2 - 02-20-2012 I need some help with this. When I try to start the game I get "Unexpected end of file" error. this is the whole script: //////////////////////////// // Run first time starting map void OnStart() { SetEntityPlayerInteractCallback("BreakDoor", "BreakTheDoor", true); AddEntityCollideCallback("Player", "sawscare", saw", true, 1); } void BreakTheDoor(string &in asEntity) { SetPropHealth("BreakDoor", 0); GiveSanityDamage(10, true); } void saw(string &in asParent, string &in asChild, int alState) { SetEntityActive("man", true); PlaySoundAtEntity("man", "24_burn3.snt", "Player", 0, false); GiveSanityDamage(5.0f, true); AddTimer("", 0.8f, "Timer_1"); StartPlayerLookAt("man", 10, 50, ""); AddTimer("", 2, "TimerStopPlayerLook2"); } void TimerStopPlayerLook2(string &in asTimer) { StopPlayerLookAt(); } void Timer_1(string &in asTimer) { SetEntityActive("man", false); GiveSanityDamage(5.0f, true); } //////////////////////////// // Run when entering map void OnEnter() { } //////////////////////////// // Run when leaving map void OnLeave() { } Please help D: RE: HELP - SCRIPTING D: - Your Computer - 02-20-2012 AddEntityCollideCallback in OnStart has an incomplete string. RE: HELP - SCRIPTING D: - GoranGaming - 02-20-2012 The problem is:
AddEntityCollideCallback("Player", "sawscare", saw", true, 1); RE: HELP - SCRIPTING D: - stinset2 - 02-20-2012 Thanks guys, it works ![]() |