Jump to content

NPC package problems


Xenomorph217

Recommended Posts

Ok so I made a menu where you can tell the NPC to follow you or stay. But they dont work, it will continue to idle where it is and wont follow. Im using a script thats suppose to change its packages, my script uses "addscriptpackage IDLE" and "addscriptpackage Follow" it also removes its previous package like "removescriptpackage IDLE" but the script isnt working. Anyone know whats going on? :confused:
Link to comment
Share on other sites

Why don't you just have all packages on the NPC with conditions based on variables in the script? That's how vanilla AI behaviors are done.

Like luthienanarion said...

For example WAIT:

1. On NPC script make a short Waiting ; 0 = Not waiting, 1 = Waiting

2. Make a FollowersNPCNameFollowPlayerWAIT package with condition GetScriptVariable, Reference:NPCNameREF, Waiting == 1

3. Then in main quest under topics add the topic FollowersWait with a condition of GetScriptVariable, Reference:NPCNameREF, Waiting == 0 and a result script of set NPCNameREF.Waiting to 1

 

edit: The packages FollowersNPCNameFollowPlayerLONG, DEFAULT, and WAIT are added to the NPC's AI packages (and L38 package) and activated by conditions in the dialogue. Any other Travel, etc. packages are added by the script NPCNameREF.AddScriptPackage PackageName

Edited by DizzasterJuice
Link to comment
Share on other sites

But they dont work, it will continue to idle where it is and wont follow. Im using a script thats suppose to change its packages, my script uses "addscriptpackage IDLE" and "addscriptpackage Follow" it also removes its previous package like "removescriptpackage IDLE" but the script isnt working. Anyone know whats going on? :confused:

 

Luthienanarion & DizzasterJuice know their stuff, I'd follow their advice. But if you decide not too, you may need to throw a evp (EvaluatePackage) to get them to change their behavior in between packages....or maybe not, just a thought

Edited by devinpatterson
Link to comment
Share on other sites

  • Recently Browsing   0 members

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