Xenomorph217 Posted August 18, 2012 Share Posted August 18, 2012 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 More sharing options...
luthienanarion Posted August 18, 2012 Share Posted August 18, 2012 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. Link to comment Share on other sites More sharing options...
DizzasterJuice Posted August 19, 2012 Share Posted August 19, 2012 (edited) 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 = Waiting2. Make a FollowersNPCNameFollowPlayerWAIT package with condition GetScriptVariable, Reference:NPCNameREF, Waiting == 13. 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 August 19, 2012 by DizzasterJuice Link to comment Share on other sites More sharing options...
devinpatterson Posted August 20, 2012 Share Posted August 20, 2012 (edited) 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 August 20, 2012 by devinpatterson Link to comment Share on other sites More sharing options...
Recommended Posts