Read my comments.
//////////////////
// Run first time starting map
void OnStart()
{
SetEntityPlayerInteractCallback("Potion_Oil_Scare1", "Monster_Grunt_Spawn", true);
AddEntityCollideCallback("Player", "CabinetJumpScare", "CabinetJumpScare_Func", true, 1);
}
///////////////////
// Place all your functions in here!
void CabinetJumpScare_Func(string &in asParent, string &in asChild, int alState)
{
AddTimer("T1", 11, "CabinetDoorsOpen2");
}
void CabinetDoorsOpen(string &in asTimer)
{
//why was there a string x = asTimer here? That's just a waste of resources, just make asTimer the conditional check, it's the same thing
if(asTimer == "T1")
{
SetSwingDoorClosed("Cabinet_Simple_1", false, false);
SetMoveObjectState("Cabinet_Simple_1", 1);
PlaySoundAtEntity("", "21_scream10.ogg", "Player", 0, false);
}
} //you forgot to close this function, leading to the end of file error
//when you're doing interact callbacks, asEntity is the parameter, not &inItem which is what you were doing before
void Monster_Grunt_Spawn(string &in asEntity)
{
SetEntityActive("Monster_Grunt1", true);
AddEnemyPatrolNode("Monster_Grunt1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("Monster_Grunt1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("Monster_Grunt1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("Monster_Grunt1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("Monster_Grunt1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("Monster_Grunt1", "PathNodeArea_6", 2, "");
AddEnemyPatrolNode("Monster_Grunt1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("Monster_Grunt1", "PathNodeArea_4", 5, "");
AddEnemyPatrolNode("Monster_Grunt1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("Monster_Grunt1", "PathNodeArea_8", 0, "");
}
///////////////////
// Run when entering map
void OnEnter()
{
}
// Run when leaving map
void OnLeave()
{
}