The monster will only continue on its patrol path under one of two conditions: The player is still within its activation distance, or the player is still looking at the monster. If neither of these conditions are met, the monster will be automatically deactivated. That wiki article shows how to add path nodes to the monster, so i won't show how here.

(12-07-2011 08:47 PM)i3670 Wrote: Ok, too bad. But, is there a way to compress the path nodes, so that I don't have put like a hundred
"AddEnemyPatrolNode" in the script?

If you're not moving the enemy across the Atlantic Ocean or up TONS of stairs, you don't need a HUNDRED pathnodes... I covered a large area in my 24-hour challenge with about 15-20 pathnodes in total >> and that was 3 different enemies.

Just copy and paste as many as needed and change the number of the path node

If you add all 100 path nodes, the grunt will pause momentarily at each one. If you want the grunt to move from the first path node to the last, simply script the enemy to move to the last one. The AI will handle the pathing, and the monster will take the shortest route to that node, and use the path nodes only if a direct path to the destination is obstructed.

On the flipside of that, if the grunt tries to make a straight line for the destination but you want it to take a very specific route, script it to move to waypoints along the path -- say, every 20th node. That way the monster isn't constantly stopping, and it takes the path you want it to.

(12-07-2011 09:57 PM)palistov Wrote: If you add all 100 path nodes, the grunt will pause momentarily at each one. If you want the grunt to move from the first path node to the last, simply script the enemy to move to the last one. The AI will handle the pathing, and the monster will take the shortest route to that node, and use the path nodes only if a direct path to the destination is obstructed.

Will that work if I put it like this:

Let's say we have a + shaped map. There are 3 pathnodes. The monster starts at the upper arm. PathNode1 is in the left arm, Pathnode2 in the bottom and 3rd in the right one. I want him to follow the 1-2-3.

Monsters have trouble with turning corners or going around corners, so if you want a monster to go around a corner, you'll need at least three path nodes so that it forms the shape of a L per corner turn. For a plus sign intersection, i would expect 5 path nodes would be required for best results.

Yeah if it's a cross shape, you'll need a node in the intersection, so the grunt knows to path to the center and turn the corner. There's no real need for any other nodes, but the AI for detecting and investigating sounds/player sightings requires nearby path nodes, so populate the cross with a node every 1-2 meters, regardless of whether or not you'll actually tell the grunt to move to that exact location.