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
Enemies don't follow pathnodes...
Lewk Offline
Member

Posts: 63
Threads: 6
Joined: Sep 2011
Reputation: 3
#1
Enemies don't follow pathnodes...

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.
(This post was last modified: 09-07-2011, 02:00 AM by Lewk.)
09-06-2011, 09:40 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Enemies don't follow pathnodes...

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/amn...ns#enemies

Tutorials: From Noob to Pro
09-06-2011, 10:18 PM
Website Find
Lewk Offline
Member

Posts: 63
Threads: 6
Joined: Sep 2011
Reputation: 3
#3
RE: Enemies don't follow pathnodes...

(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/amn...ns#enemies





thenks dued
09-06-2011, 10:23 PM
Find
Lewk Offline
Member

Posts: 63
Threads: 6
Joined: Sep 2011
Reputation: 3
#4
RE: Enemies don't follow pathnodes...

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.
09-07-2011, 01:10 AM
Find
GraphicsKid Offline
Senior Member

Posts: 258
Threads: 34
Joined: Dec 2010
Reputation: 3
#5
RE: Enemies don't follow pathnodes...

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...
09-07-2011, 01:13 AM
Find
Lewk Offline
Member

Posts: 63
Threads: 6
Joined: Sep 2011
Reputation: 3
#6
RE: Enemies don't follow pathnodes...

(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.
(This post was last modified: 09-07-2011, 01:30 AM by Lewk.)
09-07-2011, 01:28 AM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#7
RE: Enemies don't follow pathnodes...

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.
(This post was last modified: 09-07-2011, 01:32 AM by MrBigzy.)
09-07-2011, 01:31 AM
Find
Lewk Offline
Member

Posts: 63
Threads: 6
Joined: Sep 2011
Reputation: 3
#8
RE: Enemies don't follow pathnodes...

(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
09-07-2011, 01:55 AM
Find
MegaScience Offline
Member

Posts: 213
Threads: 1
Joined: Aug 2011
Reputation: 2
#9
RE: Enemies don't follow pathnodes...

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.
09-07-2011, 02:20 AM
Find
Phoroneus Offline
Member

Posts: 141
Threads: 12
Joined: Feb 2011
Reputation: 0
#10
RE: Enemies don't follow pathnodes...

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.

[Image: at_9365860.png]

Follow Harvest.
09-07-2011, 03:08 AM
Find




Users browsing this thread: 1 Guest(s)