[CHAOS] Enemy not following - Walking into walls - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [CHAOS] Enemy not following - Walking into walls (/thread-24583.html) |
Enemy not following - Walking into walls - Melvin - 02-10-2014 Hello Frictional Games forum, it's been a while I've been looking a while for a way to fix this, enemies completely ignore the fact that there's a wall in front of them. So when chasing, they just walk against the wall (when the player moves behind corners etc.). I'm assuming it has something to do with the pathnodes, but I'm not sure how to use them in a way that'll fix this problem. Every pathnode tutorial I look up only covers the looping enemies and the basic stuff. On the other hand, it might have something to do with the map modeling hence the multiple issues prefix. I'm looking forward to you replies! RE: Enemy not following - Walking into walls - Radical Batz - 02-10-2014 Did you make the path nodes kind of close to walls, maybe that's why it keeps running into the wall, This happened to me before. RE: Enemy not following - Walking into walls - RaideX - 02-10-2014 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 RE: Enemy not following - Walking into walls - Mudbill - 02-10-2014 Also try having some space between your walls. I've heard that has been an issue for some people, making the monster not calculate that there is a wall there correctly. RE: Enemy not following - Walking into walls - Melvin - 02-10-2014 (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). 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 ) RE: Enemy not following - Walking into walls - Mudbill - 02-10-2014 Place some nodes around and he will know where to go. Enemies use nodes even when you don't assign them. RE: Enemy not following - Walking into walls - LordOfDragons - 02-10-2014 (02-10-2014, 06:38 PM)Mudbill Wrote: Place some nodes around and he will know where to go. Enemies use nodes even when you don't assign them. That means you dont have to script anything? Just placing nodes will do it? I already scripted some monsters so they walk a path without noticing the player, but i dont know if the enemy would walk correctly if you just place them. RE: Enemy not following - Walking into walls - i3670 - 02-10-2014 Place a bunch of pathnodes, tell the monster which one it should go to and it will choose the shortest path according to the placement of the path nodes. RE: Enemy not following - Walking into walls - Melvin - 02-10-2014 (02-10-2014, 07:11 PM)i3670 Wrote: Place a bunch of pathnodes, tell the monster which one it should go to and it will choose the shortest path according to the placement of the path nodes.This still doesn't solve the fact that the monster will walk into walls and continues to moonwalk towards it until he lost interest in the player. RE: Enemy not following - Walking into walls - Mudbill - 02-11-2014 A screenshot of your level editor could maybe help. share pl0x? |