Jump to content

NPC underwater swimming patrol?


Recommended Posts

Trying to make an NPC do an underwater patrol, swimming between 3 underwater idle markers.

 

The NPC is set as invulnerable. Their AI package is: defaultpatrollinkedref. The 3 patrol idle markers are marked as owned by the NPC, are linked to each other, and each have idle times of 10 seconds. The underwater has navmesh, and the navmesh plane covers the patrol idle markers.

 

In game, the NPC does not patrol, they just tread water in one place. They are completely underwater when treading, and do this indefinitely.

 

Any creative ideas on how to get the NPC to move between markers? Or not possible in FO4?

 

Edit: The patrol the NPC has is the defaultpatrollinked ref but with the "allow swimming" box checked.

Link to comment
Share on other sites

I'd say the navmesh you got underwater must be ticked as 'water' in navmesh editing tab (ctrl+e). The triangles should become blue. And in Skyrim there was some box to tick in the race that told game this race is a water creature. I'll post later if I find.
Link to comment
Share on other sites

As long as the package has 'allow swimming' (package flag, checkbox) and the NPC can swim (race, check box and animation available), it really should just work.
(I'm making assumptions because I've never actually done it, but it's not a hard process and you're pretty adept at this from what I've seen)

That's a weird one.
Wonder if maybe because it's (in the water) the one place where height matters...?

Edit: Maybe loosen the 'within distance' of the marker you want to travel to?
Regardless of ownership, try it with the NPC linkref'd to one of the 3 markers as a start point just for good measure?
I'll take a look in a bit, too, because it kinda sounds like something I'd like to do myself.
...I bet it's something silly stopping it though.

Link to comment
Share on other sites

Thanks, to clarify:

 

- The navmesh triangles are set as blue (toggle water)

- The NPC is human race. Haven't edited anything there. In CK, the HumanRace has the "swims" box checked by default.

- NPC's patrol package allows swimming

- NPC has a linkref to one of the 3 patrol markers.

Link to comment
Share on other sites

Thanks, to clarify:

 

- The navmesh triangles are set as blue (toggle water)

- The NPC is human race. Haven't edited anything there. In CK, the HumanRace has the "swims" box checked by default.

- NPC's patrol package allows swimming

- NPC has a linkref to one of the 3 patrol markers.

 

Have you verified the pkg itself is working? You might try moving the markers out of the water to see if he'll walk between them. It might not be the swimming that's the problem. It might be something else going on that is masked by the swimming aspect (pkg order needs tweaking, conditions conflict with other pkgs on the actor/alias it fills, etc).

Link to comment
Share on other sites

Oh yeah, that's a good one, package order makes a difference. Good job.

 

Maybe ThuggySmurf knows that already, but man, it really screwed me up until *I* realized it.

I assume he knows about it, but sometimes I get stuck on the big, showy problem when it turns out it's something more fundamental. And objects can be bugged and never work correctly. It never hurts when stuff refuses to work and you think it should to go back over the basics to make sure they're set up right.

Link to comment
Share on other sites

 

Oh yeah, that's a good one, package order makes a difference. Good job.

 

Maybe ThuggySmurf knows that already, but man, it really screwed me up until *I* realized it.

I assume he knows about it, but sometimes I get stuck on the big, showy problem when it turns out it's something more fundamental. And objects can be bugged and never work correctly. It never hurts when stuff refuses to work and you think it should to go back over the basics to make sure they're set up right.
Yep, fully agreed, always worth checking. The little common things can throw us all for a loop once in a while.

Only takes one common little innocent nail in the tire to make the whole car not work. =)

Link to comment
Share on other sites

Thanks for the suggestions.

 

When I drag the NPC and the 3 patrol idle markers from water onto land, the patrol works fine. It's only in water where it doesn't work. In water, the NPC always spawns at the first patrol marker they are linked to, but then the NPC does not move from there. They just tread water. The navmesh plane in the water (marked as blue) is level, positioned just above the patrol idle markers, and the patrol idle markers are all at the same height relative to world space, each other, and the navmesh plane.

Link to comment
Share on other sites

Thanks for the suggestions.

 

When I drag the NPC and the 3 patrol idle markers from water onto land, the patrol works fine. It's only in water where it doesn't work. In water, the NPC always spawns at the first patrol marker they are linked to, but then the NPC does not move from there. They just tread water. The navmesh plane in the water (marked as blue) is level, positioned just above the patrol idle markers, and the patrol idle markers are all at the same height relative to world space, each other, and the navmesh plane.

 

If you placeatme an actor or take a companion through the water do they swim like they should?

 

If they swim like they should does an evp or something similar (in the console) get the original actor moving correctly? Have you considered using a scene to get him through the patrol?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...