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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple Issues Help Enemy not following - Walking into walls
RaideX Offline
Member

Posts: 212
Threads: 33
Joined: May 2013
Reputation: 7
#3
RE: Enemy not following - Walking into walls

Pathnodes work as guidelines for the enemies. When there are no pathnodes around the enemy will walk in the straight direction to the player (this is causing the enemy to walk into walls).

So to fix your issue you will have to lay out pathnodes for the enemy to go to. It'll automatically calculate the shortest way to the player or you can even tell it to go to specific pathnodes with the following function.

void AddEnemyPatrolNode(string& asName, string& asNodeName, float afWaitTime, string& asAnimation);
Adds a patrol node to the enemy's path.

asName - internal name of the enemy
asNodeName - path node
afWaitTime - time in seconds that the enemy waits at the path node before continuing
asAnimation - the animation the enemy uses when reaching the path node

If you don't draw first, you don't get to draw at all... -The False Shepherd
(This post was last modified: 02-10-2014, 10:49 AM by RaideX.)
02-10-2014, 10:49 AM
Find


Messages In This Thread
RE: Enemy not following - Walking into walls - by RaideX - 02-10-2014, 10:49 AM



Users browsing this thread: 1 Guest(s)