void OnStart()
{
FadeOut(0);
FadeIn(10);
AddEntityCollideCallback("Player", "Studydooropen", "CollideRoomTwo", true, 0);
AddUseItemCallback("", "bedroomkey_1", "mansion_1", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "Statuescare", "Statuescare", true, 1);
AddEntityCollideCallback("Player", "darkmemento", "Darkmemento", true, 1);
AddUseItemCallback("", "stairskey_1", "level_wood_1", "UsedKeyOnDoor_2", true);
SetEntityConnectionStateChangeCallback("button_simple_1", "opendoor_1");
}
void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
AddTimer("Timer_1", 10, "Clearnodes_1");
SetSwingDoorClosed("mansion_2", true, true);
SetSwingDoorLocked("mansion_2", true, true);
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
}
void Clearnodes_1(string &in asTimer)
{
ClearEnemyPatrolNodes("servant_grunt_1");
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("bedroomkey_1");
}
void UsedKeyOnDoor_2(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("level_wood_1", false);
PlaySoundAtEntity("", "unlock_door", "mansion_5", 0, false);
RemoveItem("stairskey_1");
}
void Statuescare(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("Statue_1", 75, 100, "");
AddTimer("Scaretimer_1", 3, "STAHP");
}
void STAHP (string &in asTimer)
{
StopPlayerLookAt();
}
void Darkmemento(string &in asParent, string &in asChild, int alState)
{
AddQuest("darkQuest","DarkQuest");
}
void opendoor_1(string &in asEntity, int alState)
{
SetEntityActive("servant_grunt_2", true);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_11", 0, "");
SetEntityActive("cabinet_metal_1", false);
SetEntityActive("cabinet_metal_2", true);
}
void OnLeave()
{
}
main (79,1) : ERR : Unexpected end of file
Nevermind, deleted map1_cache and now it works
! Thanks a lot!
Alright, moar questions: How do I add that sanity loss effect when you see some shit like a pile of bodies and your screen goes all shaky for a moment and your sanity goes down? And how do I get that blue-ish sanity gain effect? I couldn't find it on
http://wiki.frictionalgames.com/hpl2/amn..._functions