flyero Posted March 28, 2010 Share Posted March 28, 2010 Hello, I made a QuestScript, wich adds an Script Package to an Reference Variable, wich can be any NPC in the Game. The Script Package is an Wander Package, Current Position, Radius 20. In the first seconds this works fine, but after a short time, the NPC just walks away and does other stuff like before. I even tried to check Must Complete or Must Reach Location. The Stupid thing about this is, this just happens sometimes. Sometimes it does what the Script Package says, but sometimes it ignores it after some time. I even tried to run this every 5 seconds, but still the same problem: if NPCRef.GetIsCurrentPackage PackageRef == 0 NPCRef.AddScriptPackage PackageRef endif Does anybody know how to make this Script Package more Persistent? Shouldn't it be possible, that if i wait for a hour, the NPC keeps running that Package? It's enough to drive one to despair. Thanks everybody! Link to comment Share on other sites More sharing options...
Khet Posted March 28, 2010 Share Posted March 28, 2010 It's conflicting with the NPCs existing packages. Here's a basic run down. Keeping it simple here. Let's say each action we give the NPC lasts for one hour (eating and sleeping) A 12:00 NOON the NPC Eats lunch. And 12:00 MIDNIGHT the NPC goes to bed. Now say we add your package. Between 12:00 NOON and 12:59 (still noon) the NPC will be eating lunch. At 1:00 in the afternoon up until 11:59 (at night) the NPC will wander. Then, as 12:00 MIDNIGHT to 12:59 (night) that package will take priority over all others and the NPC will sleep. Then, at 1:00 (night) the NPC will wake up and wander until 12:00 NOON again where the eating package then takes over and the NPC goes to lunch, repeating the cycle. Basically, if one package is running, then the conditions for another package are met (our lunch and sleep packages) those take priority until they're finished. If you want an NPC to do nothing but wander... remove ALL other packages from the NPC and they'll do nothing but wander (because wandering will be the ONLY package in their list) Link to comment Share on other sites More sharing options...
flyero Posted March 28, 2010 Author Share Posted March 28, 2010 But then i also wouldn't even need a Script Package right? The Problem is, as i wrote, it could be any NPC in Oblivioni don't want to remove every Package from every NPC in Oblivion and i don't think there is a Script-Command that removes other Packages. I am just confused, because the Construction Set Wiki says: Add a script package to the calling actor. This package takes precedence over all other packages until it is done. and thats seemingly not true Link to comment Share on other sites More sharing options...
bamspeedy Posted March 28, 2010 Share Posted March 28, 2010 I don't know much about scripting, but just to make sure....What do you have for the 'time' and 'duration' on this script package? Are you wanting someone to 'stay' in an area, like a companion told to 'wait'? Then look at the mods where this works and see how they did it. CM Partners has a 'standby' AI package with the schedule: Month: -1Day of week: AnyDate: 0Time: -1Duration: 10000 (Yes, those are negative numbers for month and time) A 'vampchow' package in oblivion where a person sleeps 24/7 in the testinghall (for a vampire to feed on him whenever) has the same details except the duration is 0 (but he most likely has no other AI packages to worry about conflicting). Link to comment Share on other sites More sharing options...
flyero Posted March 29, 2010 Author Share Posted March 29, 2010 Thank you all!i forgot to set the Duration...Great it works now! Link to comment Share on other sites More sharing options...
Recommended Posts