I wrote a simple script and for some reason it's not working. I've tried everything. (Yes, I double checked the name of the area in the level editor.
)
void OnStart()
{
AddEntityCollideCallback("Player", "AreaSeeMonster", "SeeMonster", true, 1);
}
void SeeMonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("monster_1");
StartPlayerLookAt("monster_1", 2.0f, 2.0f, "");
GiveSanityDamage(15, true);
AddDebugMessage("SeeMonster", false);
}
I get no errors when loading the map or anything. It just doesn't work. The debug message doesn't show up either. Is there a reason why this could be happening?
Thanks.