For my map I am having a closet right next to the first spawn, and when opened, a grunt is inside. Problem is, when they respawn, I want to to not be there. So, I am using boolean variable 'ClosetTriggered' to check if it has already been activated. I have it set in the OnStart() function, and it still gives tells me it is not declared.
Here is the part of the script relating to it:
////////////////////////////
// Run when the map starts
void OnStart()
{
AddUseItemCallback("", "Pick", "StartDoor", "UNLOCK", true);
AddEntityCollideCallback("Player", "RoomScare", "ClosetScare", true, 1);
bool (ClosetTriggered == false);
}
//GRUNT IN CLOSET SCARE
void ClosetScare(string &in asParent, string &in asChild, int alState)
{
for (ClosetTriggered == true);
{
SetEntityActive("ClosetMonster", false);
}
else
{
SetEntityActive("ClosetMonster", true);
(ClosetTriggered == true);
}
}