Frictional Games Forum (read-only)
Enemies don't follow pathnodes... - 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: Enemies don't follow pathnodes... (/thread-10193.html)

Pages: 1 2


Enemies don't follow pathnodes... - Lewk - 09-06-2011

Enemies dont follow nodes on their own. I have to let them see me first, then they'll start to follow the nodes, but until then, they just stand in place.



You might be thinking about telling me "Well, fellow member, that is how pathnodes are supposed to work!"



Ok, alright. But what if I wanted to do a (whats generally referred to as a scripted event) part where you just see a monster behind a gate, (with triggers disabled obviously, the monster will have to move on its own) and walks away before you get there. I wouldn't, seeing as how pathnodes work.



So, my questions are:

1: If an event like that requires more than just nodes, may I ask what those extra requirements are?

2: Are my pathnodes just not working correctly?

Thanks.



EDIT: In case I made it unclear, I mean the monster doesnt follow the nodes until he has lost me after noticing me.


RE: Enemies don't follow pathnodes... - Your Computer - 09-06-2011

Monsters don't follow path nodes automatically unless, as you've figured out, they spot the player. If you want them to follow a certain path without first spotting the player, you'll need to add the path nodes to the monster with AddEnemyPatrolNode(). Definition of function found here: http://wiki.frictionalgames.com/hpl2/amnesia/script_functions#enemies


RE: Enemies don't follow pathnodes... - Lewk - 09-06-2011

(09-06-2011, 10:18 PM)Your Computer Wrote: Monsters don't follow path nodes automatically unless, as you've figured out, they spot the player. If you want them to follow a certain path without first spotting the player, you'll need to add the path nodes to the monster with AddEnemyPatrolNode(). Definition of function found here: http://wiki.frictionalgames.com/hpl2/amnesia/script_functions#enemies





thenks dued



RE: Enemies don't follow pathnodes... - Lewk - 09-07-2011

Ok, it seems I have hit another problem. The enemy follows the nodes as they should, with their triggers disabled. So, I turned triggers on, the monster chased me, but once I came to a corner, the monster was just trying to get to me in a straight line. Obviously, he stopped following the nodes after he noticed me.

What I need to know is how to get him to follow a a certain node, if something blocks his path.



RE: Enemies don't follow pathnodes... - GraphicsKid - 09-07-2011

Be sure to put plenty of pathnodes down. Make sure the line connecting nodes that are adjacent to a corner aren't connected, or the monster will try to cut the corner when it can't. IIRC I usually space them about 2 units apart.

If the monster is acting stupidly... that's probably just the bad ai manifesting itself...


RE: Enemies don't follow pathnodes... - Lewk - 09-07-2011

(09-07-2011, 01:13 AM)GraphicsKid Wrote: Be sure to put plenty of pathnodes down. Make sure the line connecting nodes that are adjacent to a corner aren't connected, or the monster will try to cut the corner when it can't. IIRC I usually space them about 2 units apart.

If the monster is acting stupidly... that's probably just the bad ai manifesting itself...

The monster simply stops following the pathnodes while its hunting me. If it's looking/wandering, it'll just go where to whatever node it feels like. lol

basically, I want a part where the monster starts chasing you from the moment it spawns (very much like the brute at the end of the sewers) and to know where you are at all times. (while doing this, I want the monster to follow a node or two if it needs to get around something, but it just seems like it stops following nodes entirely when it's after me.)

Forgot to mention; I'm using the script function thats supposed to show the monster where you are at all times: "ShowEnemyPlayerPosition"

However, instead of trying to get to me, the player, it goes to my spawn point.


RE: Enemies don't follow pathnodes... - MrBigzy - 09-07-2011

IIRC the monsters don't follow path nodes at all when chasing you. :V

Or it might be that it follows a line through the nodes that connects closest to you, despite obstacles. Either way, it can cause problems.


RE: Enemies don't follow pathnodes... - Lewk - 09-07-2011

(09-07-2011, 01:31 AM)MrBigzy Wrote: IIRC the monsters don't follow path nodes at all when chasing you. :V

Or it might be that it follows a line through the nodes that connects closest to you, despite obstacles. Either way, it can cause problems.



it doesnt even try to go to the nodes that are most close to me, it just trys to go to the last place it heard a sound.



this is truly awful. Sad



RE: Enemies don't follow pathnodes... - MegaScience - 09-07-2011

I believe enemies hate straying too far from path nodes, so whatever path it follows to you can't be far from one... That way, it can still try to find it's way back.



RE: Enemies don't follow pathnodes... - Phoroneus - 09-07-2011

If memory serves me right, ShowEnemyPlayerPosition gives the monster a snapshot of where you are at the time it's called, rather than a permanent view of your location. If you call it right at the start, the monster will run to your spawn point in search of you. If you're still in LOS or audible to the monster, it'll continue to hunt you, otherwise it will search briefly and then become confused and just stop activity (unless it has another assignment to get to).

Your best bet to have a monster constantly chasing you is to give it a full nodemap (around and between all obstacles and anywhere you might put non-breakable obstacles) and then repeatedly call ShowEnemyPlayerPosition. If your intent is only to have the monster chase the player, then ShowEnemyPlayerPosition is probably more than you want, since it'll run faster than the player can get away from it, and will ultimately kill the player if they can't get to safety in time. There are a bunch of other methods to get it to follow you menacingly without it actually killing you, but they're a bit more complicated.

Of course, the "cutting-corner" problem is the first thing you should check for, since that'll confuse the heck out of the AI.