script error[FIXED]
void OnStart()
{
SetEntityCallbackFunc("keynotwork", "PickUpKeyFunc");
AddEntityCollideCallback("servant_grunt_1", "ScriptArea_1", "remove", true, 1);
AddUseItemCallback("borkenKey", "keynotwork", "cellar_wood01_1", "BrokenKeyWontOpenDoor", true);
AddUseItemCallback("borkenKey", "Secret", "castle_4", "secretdoor1", true);
AddUseItemCallback("", "hollow_needle_1", "cellar_wood01_1", "key1", true);
AddEntityCollideCallback("Player", "HallowNeedle", "func1", true, 1);'
AddEntityCollideCallback("Player", "ScriptArea_2", "func2", true, 1);
AddEntityCollideCallback("servant_brute_1", "ScriptArea_3", "func3", true, 1);
}
void func3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", false);
}
void func2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_7", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_8", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_9", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_10", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_11", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_12", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_13", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_14", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_15", 2, "");
}
void secretdoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_4", false, true);
PlaySoundAtEntity("", "unlock_door", "castle_4", 0, true);
RemoveItem("Secret");
GiveSanityBoostSmall();
}
void key1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cellar_wood01_1", false, true);
PlaySoundAtEntity("", "unlock_door", "cellar_wood01_1", 0, true);
RemoveItem("hollow_needle_1");
GiveSanityBoostSmall();
}
void func1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("hanging_prisoner_1", true);
SetEntityActive("hanging_prisoner_2", true);
SetEntityActive("hollow_needle_1", true);
PlaySoundAtEntity("scream_sound", "24_iron_maiden.snt", "hanging_prisoner_2", 1, true);
PlaySoundAtEntity("scream_sound1", "24_iron_maiden.snt", "hanging_prisoner_1", 1, true);
SetMessage("Message", "HallowNeedle", 3);
}
void BrokenKeyWontOpenDoor(string &in asItem, string &in asEntity)
{
SetMessage("Message", "brokenkey", 5);
RemoveItem("keynotwork");
PlaySoundAtEntity("", "locked_door.snt", "cellar_wood01_3", 0, true);
}
void remove(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", false);
FadeEnemyToSmoke("servant_grunt_1", true);
}
void PickUpKeyFunc(string &in entity, string &in type)
{
if(type == "OnPickup")
{
SetPlayerActive(false);
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 2, "");
StartPlayerLookAt("castle_2", 5, 5, "");
PlaySoundAtEntity("", "react_scare.snt", "mansion_2", 0, false);
GiveSanityDamage(40, true);
SetSwingDoorLocked("cellar_wood01_3", false, true);
GiveSanityBoostSmall();
AddTimer("StopLookAt", 3, "StopLookAtEvent");
}
}
void StopLookAtEvent(string &in asTimer)
{
SetPlayerActive(true);
StopPlayerLookAt();
} here!
it says error
|