I have a scenario where a dog's head is created and falls out of a window, then, once you interact with the dog's head, the door behind you slams closed and is locked. I also have it set so that if you interact with the door after it is locked, an enemy is spawned behind you, but the enemy never spawns. The game runs fine, all except for the enemy spawning.
Here is my code:
void OnStart ()
{
SetEntityPlayerInteractCallback("cellar_wood01_1", "InteractGrunt", true);
}
void InteractGrunt (string &in asEntity)
{
if (GetSwingDoorLocked("cellar_wood01_1") == true)
ActivateGrunt();
}
void ActivateGrunt()
{
SetEntityActive("servant_grunt_1", true);
}
I have the correct callback function attached to the door in the level editor, but the function still doesn't work.