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
Melvin Offline
Member

Posts: 245
Threads: 38
Joined: Jun 2012
Reputation: 5
#5
RE: Enemy not following - Walking into walls

(02-10-2014, 10:49 AM)RaideX Wrote: 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

Yea that's the problem
Quote:"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"

How will patrol nodes to the enemy's path fix my problem actually? How do I let the Enemy know that he is going to run into a wall? That's my main problem actually.
(Remember that I'm still learning it all, go easy on me Tongue)

[Image: 25F7U37.png]
02-10-2014, 05:04 PM
Website Find


Messages In This Thread
RE: Enemy not following - Walking into walls - by Melvin - 02-10-2014, 05:04 PM



Users browsing this thread: 1 Guest(s)