Here Is The Whole Script:
////////////////////////////+
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Prisonkey_1", "prison_1", "usedkeyondoor", true);
}
void usedkeyondoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prison_1", false, true);
PlaySoundAtEntity("", "unlock_door", "prison_1", 0, false);
RemoveItem("Prisonkey_1");
}
{
AddEntityCollideCallback("Player", "monster", "MonsterStart", true, 1);
}
void MonsterStart(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "endNode", 9999.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 9999.0f, "");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}