Yet again a new scripting problem.
The game throws that error at me when I change levels(from first to second).
The functions that are causing the error don't even exist in the script. Can't figure out what is causing this...
void OnStart()
{
//AddEntityCollideCallback(string& asParentName, string& asasChildName, string& asFunction, bool abDeleteOnCollide, int alStates);
//18_amb.ogg
AddEntityCollideCallback("Player", "StartArea_1", "spook", true, 1);
AddEntityCollideCallback("Player", "StartArea_1", "spook", true, -1);
AddEntityCollideCallback("Player", "ScriptArea_1", "spook", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "spook", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "spook", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "spook", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_5", "spook", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_6", "spook", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_10", "spook", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_8", "DoorCloses", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_9", "spook", true, -1);
//AddUseItemCallback(string& asName, string& asItem, string& asEntity, string& asFunction, bool abAutoDestroy);
//MyFunc(string &in asItem, string &in asEntity)
AddUseItemCallback("", "key_tomb_1", "mansion_10", "UnlockDoor", true);
SetMessage("help", "2ndstart", 5);
}
void spook(string &in asParent, string &in asChild, int alState){
if(asChild == "StartArea_1")
PlayMusic("02_amb_safe.ogg", false, 1, 1, 1, false);
if (asChild == "ScriptArea_10"){
StopMusic(0, 1);
PlayMusic("12_amb.ogg", false, 1,1,1,false);
SetSwingDoorClosed("mansion_3", false, true);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
GiveSanityDamage(10,true);
}
if (asChild=="ScriptArea_1" || asChild=="ScriptArea_2" || asChild=="ScriptArea_3" || asChild=="ScriptArea_4")
SetEntityActive("armour_nice_complete_8", false);
if(asChild == "ScriptArea_5"){
PlaySoundAtEntity("", "scare_wood_creak_walk", "ScriptArea_7", 0, false);
PlayMusic("05_event_steps.ogg", false, 1, 1, 1, false);}
if(asChild=="ScriptArea_6")
PlayMusic("01_amb_darkness.ogg", false, 1, 1, 1, false);
AddEntityCollideCallback("Player", "ScriptArea_6", "spook", true, -1);
if (asChild=="ScriptArea_6" && alState==-1)
StopMusic(1, 1);
if(asChild=="ScriptArea_9")
SetEntityPlayerInteractCallback("mansion_13", "GruntComes2", true);
}
void DoorCloses(string &in entity){
SetSwingDoorClosed("mansion_11", true, true);
PlaySoundAtEntity("", "scare_wood_creak_walk", "PathNodeArea_1", 1, false);
}
void GruntComes(string &in entity){
SetEntityActive("servant_grunt_1", true);
SetSwingDoorClosed("mansion_10",true,true);
SetSwingDoorLocked("mansion_10", true, true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 3, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_17", 0, "");
}
void LightsOut(string &in entity){
SetLampLit("torch_static01_3", false, true);
SetLampLit("torch_static01_5", false, true);
SetLampLit("torch_static01_7", false, true);
SetLampLit("candlestick_floor_18", false, true);
SetLampLit("candlestick_floor_19", false, true);
SetLampLit("torch_static01_6", false, true);
SetLampLit("candlestick_floor_17", false, true);
SetLampLit("torch_static01_8", false, true);
SetLampLit("torch_static01_9", false, true);
SetLampLit("candlestick_floor_16", false, true);
SetLampLit("torch_static01_2", false, true);
SetLampLit("torch_static01_1", false, true);
SetLampLit("torch_static01_4", false, true);
SetLampLit("candlestick_floor_14", false, true);
SetLampLit("candlestick_floor_13", false, true);
SetLampLit("candlestick_floor_15", false, true);
SetLampLit("torch_static01_10", false, true);
SetLampLit("candlestick_floor_25", false, true);
SetLampLit("candlestick_floor_26", false, true);
SetLampLit("candlestick_floor_12", false, true);
SetLampLit("candlestick_floor_11", false, true);
SetLampLit("candlestick_floor_10", false, true);
PlaySoundAtEntity("", "scare_wind", "WindArea", 0, false);
PlayMusic("20_event_darkness.ogg", false, 1, 1, 1, false);
SetMessage("help", "lightsout", 5);
}
void UnlockDoor(string &in asItem, string &in asEntity){
SetSwingDoorLocked( asEntity, false, true);
}
void GruntComes2(string &in entity){
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_25", 3, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_17", 0, "");
}
void OutDoorInfo(){
SetMessage("help", "outside", 5);
void CellarDoorInfo(){
SetMessage("help", "cellar", 5);
}
void OnEnter()
{
}
void OnLeave()
{
}