Getting an npc to walk a waypoint help!

so to make a long story short im trying to develop a npc that will be walking across multiple areas, it all works well and good, however when the npc is disturbed or in a conversation the A.I stops and the npc immediately does absolutely nothing afterwards.

I found a few scripts from axe killer to Meaglyn (?) to this one on the Lexicon which is the closest thing i could get to what I wanted to do

This being the most simplest and precisely what i wanted however when it is compiled it gives me an error “11/28/2018 7:34:35 PM: Error. ‘rom_walk_waypoin’ did not compile.
rom_walk_waypoin.nss(2): ERROR: UNKNOWN STATE IN COMPILER”

the coding is as followed:

void WalkWayPoints(
int nRun = FALSE,
float fPause = 1.0

Now im no coder but i’ve never seen a script like this before, does anyone know of a simple way for a npc to just make sure it maintains or walks its waypoints?

That’s not a script… It’s just the declaration of the walkwaypoints function to show you the parameters you can use when you call that. The default AI should pick back up after a while since it runs off of the HB. I don’t remember all the details and issues from when I was reworking it. One thing you should do though is have the conversation exit scripts call walkwaypoints. That will get it restarted faster after conversation.

thats really what im after but the only way i know how to do something like this is to develope a very complex set of scripts that the npc to walk to an object and then walk back by telling it to walk A-Z, then Z-A.

I guess theres no other way to do it, besides that…

Indeed, as meagyn said this should not happen. Vanilla AI will restore walk-waypoint after a 6seconds of inactivity when next heartbeat script runs.

Make sure your don’t have modified nw_c2_default1 and that your npc is using it (if she uses x2_def_heartbeat then make sure that script isn’t modified) - ie. if you don’t have these two scripts in your module’s script list you didn’t modified it.

If everything is correct then maybe you could sent me a small test module to reproduce it? I can fix this.

1 Like

No. You don’t need to write a complex set of scripts. It’s already written. Also put nw_walk_wp.nss in the conversation end/aborted slots if not already there. It really should be doing what you want already unless you’ve changed something.

well its not workin so im just going to make it walk waypoints via a script :slight_smile: