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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about PathNodes for enemies
TimmayIsHawt Offline
Junior Member

Posts: 20
Threads: 9
Joined: Jul 2011
Reputation: 0
#1
Question about PathNodes for enemies

I was wondering, do enemies go in an order when they go through different path nodes or do they just go in a random order?
08-14-2011, 10:24 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: Question about PathNodes for enemies

They go in the order you set them in. In a function, it will do the first path node that is set up for the monster and then work it's way down the function following the order. If they went in a random order, there would be no easy way to set a monster up with path nodes. Tongue

08-14-2011, 10:30 PM
Find
TimmayIsHawt Offline
Junior Member

Posts: 20
Threads: 9
Joined: Jul 2011
Reputation: 0
#3
RE: Question about PathNodes for enemies

Okay thanks Big Grin
08-14-2011, 10:37 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Question about PathNodes for enemies

(08-14-2011, 10:30 PM)Kyle Wrote: They go in the order you set them in. In a function, it will do the first path node that is set up for the monster and then work it's way down the function following the order. If they went in a random order, there would be no easy way to set a monster up with path nodes. Tongue

It should be noted that when adding a patrol node with AddEnemyPatrolNode(), you do not need to specify every single pathnode in the map. For example, let's say the user has 5 pathnodes in the map lined up in a straight line. In the script, he would only have to add the first and fifth pathnode with AddEnemyPatrolNode(). The AI would know what to do from there.

Tutorials: From Noob to Pro
08-14-2011, 10:53 PM
Website Find
Phoroneus Offline
Member

Posts: 141
Threads: 12
Joined: Feb 2011
Reputation: 0
#5
RE: Question about PathNodes for enemies

(08-14-2011, 10:53 PM)Your Computer Wrote:
(08-14-2011, 10:30 PM)Kyle Wrote: They go in the order you set them in. In a function, it will do the first path node that is set up for the monster and then work it's way down the function following the order. If they went in a random order, there would be no easy way to set a monster up with path nodes. Tongue

It should be noted that when adding a patrol node with AddEnemyPatrolNode(), you do not need to specify every single pathnode in the map. For example, let's say the user has 5 pathnodes in the map lined up in a straight line. In the script, he would only have to add the first and fifth pathnode with AddEnemyPatrolNode(). The AI would know what to do from there.

To extend this a bit, it's not a bad idea to fill all of the area that a monster might traverse with a node grid. Most might never be used, but when monsters "investigate" a sound, they attempt to path to the node nearest the place that the sound was heard. If none are nearby, the monster doesn't go anywhere unless the area is in direct LOS. If the player puts stuff in the intended path, the monster will get stuck without a grid of alternate paths to take, so make sure all walkable floorspace that the monster might need to go to (such as every room the player could hide in) has a node grid above it.

[Image: at_9365860.png]

Follow Harvest.
08-14-2011, 11:14 PM
Find




Users browsing this thread: 1 Guest(s)