Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about enemy behavior
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#1
Question about enemy behavior

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.

Dark Seclusion Here
04-12-2012, 12:55 PM
Find
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#2
RE: Question about enemy behavior

Check the Daniel's Room map to see how Frictional Games did it.


Noob scripting tutorial: From Noob to Pro

(This post was last modified: 04-12-2012, 01:28 PM by Cranky Old Man.)
04-12-2012, 01:27 PM
Find
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#3
RE: Question about enemy behavior

Ah, I see now. Some patrol nodes around the door and the rest of the room. And near that door, they have an area that despawns it when it enters it. It looks like a risky setup, seeing as the monster spawns in it. I would be afraid of it deciding to turn around and re-enter it. But, going by where the player is when it's triggered, it looks to be safe.

Dark Seclusion Here
04-12-2012, 01:48 PM
Find




Users browsing this thread: 1 Guest(s)