Nice! I did it
Here is my script if anyone wants it!
What happens is that when i touch the door, the monster gets active, and when i walk in the door it gets player position, but only if the monster is in that room.
void OnStart()
{
SetEntityPlayerInteractCallback("door_teacher", "OnInteract", false);
AddEntityCollideCallback("player", "playercollide1", "IfMonsterCollide", true, 1);
}
void IfMonsterCollide(string &in asParent, string &in asChild, int alState)
{
GetEntitiesCollide("monsterteacher1", "monstercollide1");
if(true)
{
ShowEnemyPlayerPosition("monsterteacher1");
}
}
void OnInteract(string &in asEntity)
{
SetEntityActive("monster_teacher1", true);
AddEnemyPatrolNode("monster_teacher1", "PathNodeArea_1", 2, "");
}
Trying is the first step to success.