I have a problem - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-57.html) +--- Forum: Technical Support - Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-31.html) +--- Thread: I have a problem (/thread-56727.html) |
I have a problem - DarkMattNoir - 02-21-2020 I have a problem in my script file. My script file : void OnStart() { AddEntityCollideCallback("Player", "Turnoff", "TurnOff", true, 1); AddEntityCollideCallback("Door", "Scre", "Amer", true, 1); SetEntityCallbackFunc("Note_5", "OnPickup"); SetEntityCallbackFunc("Key_10", "OnPickup2"); SetEntityCallbackFunc("Key_9", "OnPickup3"); SetEntityCallbackFunc("Key_11", "OnPickup4"); SetEntityCallbackFunc("Key_6", "OnPickup5"); SetEntityCallbackFunc("Key_7", "OnPickup6"); SetEntityCallbackFunc("Key_8", "OnPickup7"); AddEntityCollideCallback("Player", "Run", "Tornade", true, 1); AddUseItemCallback("", "Key_10", Po_1", "Por1", true); AddUseItemCallback("", "Key_9", Po_2", "Por2", true); AddUseItemCallback("", "Key_8", Po_3", "Por3", true); AddUseItemCallback("", "Key_7", Po_4", "Por4", true); AddUseItemCallback("", "Key_11", Po_5", "Por5", true); AddUseItemCallback("", "Key_6", Po_6", "Por6", true); } void TurnOff(string & in asParent, string & in asChild, int alState) { PlaySoundAtEntity("", "scare_wind.snt", "Player", 0, false); SetLightVisible("BibLamp_1", false); SetLightVisible("BibLamp_2", false); SetLightVisible("BibLamp_3", false); SetLightVisible("BibLamp_4", false); SetLightVisible("BibLamp_5", false); SetLightVisible("BibLamp_6", false); SetLightVisible("BibLamp_7", false); SetLightVisible("BibLamp_8", false); SetLightVisible("BibLamp_9", false); SetLightVisible("BibLamp_10", false); SetLightVisible("BibLamp_11", false); SetLightVisible("BibLamp_12", false); } void Amer(string & in asParent, string & in asChild, int alState) { SetEntityActive("CRS", true); AddPropForce("crs", 15000, 0, 0, "01"); PlaySoundAtEntity("", "21_screams.snt", "Player", 0, false); PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false); GiveSanityDamage(10, true); } void OnPickup(string &in asEntity, string &in type) { SetEntityActive("Key_6", true); SetEntityActive("Key_7", true); SetEntityActive("Key_8", true); SetEntityActive("Key_9", true); SetEntityActive("Key_10", true); SetEntityActive("Key_11", true); } void OnPickup2(string &in asEntity, string &in type) { SetEntityActive("Uno", true); SetEntityActive("Des", true); SetEntityActive("pig", false); StartPlayerLookAt("Look_1", 10, 10, "okurwa"); AddTimer("", 1, "Timer1"); SetPlayerActive(false); PlaySoundAtEntity("", "Pig.snt", "carcass_silent_21", 0, false); PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false); GiveSanityDamage(10, true); SetEntityActive("Bar_1", false); } void Timer1(string &in asTimer) { StopPlayerLookAt(); SetPlayerActive(true); } void OnPickup3(string &in asEntity, string &in type) { SetEntityActive("corpse_male_1", true); SetEntityActive("corpse_male_2", true); SetEntityActive("corpse_male_3", true); SetEntityActive("corpse_male_4", true); SetEntityActive("corpse_male_5", true); SetEntityActive("corpse_male_6", true); SetEntityActive("corpse_male_7", true); SetEntityActive("corpse_male_8", true); SetEntityActive("corpse_male_9", true); SetEntityActive("corpse_male_10", true); SetEntityActive("corpse_male_11", true); SetEntityActive("corpse_male_12", true); SetEntityActive("corpse_male_13", true); SetEntityActive("corpse_male_14", true); SetEntityActive("corpse_male_15", true); SetEntityActive("Bar_2", false); } void OnPickup4(string &in asEntity, string &in type) { PlaySoundAtEntity("", "break_wood.snt", "Player", 0, false); PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false); GiveSanityDamage(10, true); SetEntityActive("Box_1", false); SetEntityActive("Box_2", false); SetEntityActive("Box_3", false); SetEntityActive("Box_4", false); SetEntityActive("Box_5", false); SetEntityActive("Box_6", false); SetEntityActive("Box_7", false); SetEntityActive("Box_8", true); SetEntityActive("Box_9", true); SetEntityActive("Box_10", true); SetEntityActive("Box_11", true); SetEntityActive("Box_12", true); SetEntityActive("Box_13", true); SetEntityActive("Box_14", true); SetEntityActive("Bar_5", false); } void OnPickup5(string &in asEntity, string &in type) { SetEntityActive("Bar_6", false); } void OnPickup6(string &in asEntity, string &in type) { SetEntityActive("Bar_4", false); } void OnPickup7(string &in asEntity, string &in type) { SetEntityActive("Bar_3", false); } void Tornade(string & in asParent, string & in asChild, int alState) { SetEntityActive("CRS", false); SetEntityActive("Grunty", true); SetSwingDoorClosed("1", true, true); SetSwingDoorClosed("2", true, true); SetSwingDoorClosed("3", true, true); SetSwingDoorClosed("Door", true, true); PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false); PlaySoundAtEntity("", "enabled.snt", "Player", 0, false); PlayMusic("Action.ogg", false, 0.7, 0.1, 10, false); SetLampLit("candlestick_wall_1", true, false); SetLampLit("candlestick_wall_2", true, false); SetLampLit("candlestick_wall_3", true, false); SetLampLit("candlestick_wall_4", true, false); SetLampLit("candlestick_wall_5", true, false); SetLampLit("candlestick_wall_6", true, false); SetLampLit("candlestick_wall_7", true, false); SetLampLit("candlestick_wall_8", true, false); SetLampLit("candlestick_wall_9", true, false); SetLampLit("candlestick_wall_10", true, false); SetLampLit("candlestick_wall_11", true, false); SetLampLit("candlestick_wall_12", true, false); SetLampLit("candlestick_wall_13", true, false); SetLampLit("candlestick_wall_14", true, false); SetLampLit("candlestick_wall_15", true, false); SetLampLit("candlestick_wall_16", true, false); SetLampLit("candlestick_wall_17", true, false); SetLampLit("candlestick_wall_18", true, false); SetLampLit("candlestick_wall_19", true, false); SetLampLit("candlestick_wall_20", true, false); SetLampLit("candlestick_wall_21", true, false); SetLampLit("candlestick_wall_22", true, false); SetLampLit("candlestick_wall_23", true, false); SetLampLit("candlestick_wall_24", true, false); SetLampLit("candlestick_wall_25", true, false); SetLampLit("candlestick_wall_26", true, false); SetLampLit("candlestick_wall_27", true, false); StartPlayerLookAt("Look_2", 10, 10, "bokurwa"); AddTimer("", 1, "Timer2"); SetPlayerActive(false); AddEnemyPatrolNode("Grunty", "Path", 0.001f, ""); } void Timer2(string &in asTimer) { StopPlayerLookAt(); SetPlayerActive(true); } void Por1(string & in asItem, string & in asEntity) { PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false); RemoveItem("Key_10"); SetEntityActive("Po_1", false); SetEntityActive("Po_2", true); } void Por2(string & in asItem, string & in asEntity) { PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false); RemoveItem("Key_9"); SetEntityActive("Po_2", false); SetEntityActive("Po_3", true); } void Por3(string & in asItem, string & in asEntity) { PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false); RemoveItem("Key_8"); SetEntityActive("Po_3", false); SetEntityActive("Po_4", true); } void Por4(string & in asItem, string & in asEntity) { PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false); RemoveItem("Key_7"); SetEntityActive("Po_4", false); SetEntityActive("Po_5", true); } void Por5(string & in asItem, string & in asEntity) { PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false); RemoveItem("Key_11"); SetEntityActive("Po_5", false); SetEntityActive("Po_6", true); } void Por6(string & in asItem, string & in asEntity) { PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false); RemoveItem("Key_6"); } I know the script file is long, but if someone could help me. RE: I have a problem - Mudbill - 02-21-2020 It helps to tell what the problem is. RE: I have a problem - DarkMattNoir - 02-21-2020 The problem is : "Could not load script file" RE: I have a problem - Mudbill - 02-21-2020 Most likely a syntax error somewhere. I recommend you cut out scripts from it bit by bit (paste in another file temporarily) and retry until the error is gone, then you can find out which part of the script is causing the problem. |