04-12-2012, 12:55 PM
I'm slightly confused on the conditions in which an enemy will despawn/deactivate on its own.
A tutorial page in the wiki explains: "The monster will automatically disappear if it runs out of path nodes and the player isn't looking at it."
So going by that, if the monster has 0 path nodes on the map and it sees the player (assuming the player is close enough) it will chase the player. If the player loses sight of the monster and the monster loses sight of the player, it will disappear?
In my recent map, I just had areas that would call:
ClearEnemyPatrolNodes("servant_grunt_1");
FadeEnemyToSmoke("servant_grunt_1", true);
when an enemy entered it. This would manually despawn an enemy in areas that I defined. This limits my flexibility in terms of area placement and enemy placement, as well as other things.
How would you get the traditional scenario of: player runs from enemy. Hides in cabinet. Monster enters room; doesn't see player. Leaves room, and despawns.
A tutorial page in the wiki explains: "The monster will automatically disappear if it runs out of path nodes and the player isn't looking at it."
So going by that, if the monster has 0 path nodes on the map and it sees the player (assuming the player is close enough) it will chase the player. If the player loses sight of the monster and the monster loses sight of the player, it will disappear?
In my recent map, I just had areas that would call:
ClearEnemyPatrolNodes("servant_grunt_1");
FadeEnemyToSmoke("servant_grunt_1", true);
when an enemy entered it. This would manually despawn an enemy in areas that I defined. This limits my flexibility in terms of area placement and enemy placement, as well as other things.
How would you get the traditional scenario of: player runs from enemy. Hides in cabinet. Monster enters room; doesn't see player. Leaves room, and despawns.