Repeating AI Packages

Post » Thu Apr 16, 2015 7:29 am

In my current system I've set an actor's combat override packages to a set of custom packages. Each package is conditioned on a corresponding property within a quest script. Only one such condition will be satisfied at any given point in time, thus dictating what the actor should do. My actor is performing the packages as I'd expect, however if I try to have the actor perform the same package twice, he won't.

Performing the package twice means the actor performs the package once and the quest script's corresponding property is set to 0 (off). Then the property is set back to 1 (on) and the EvaluatePackage() is called on the actor. I'd expect the actor to perform the same package again as its the only available package that has it's condition satisfied, but instead the actor does nothing. Any ideas?

thanks,

Nathan

User avatar
Erich Lendermon
 
Posts: 3322
Joined: Sat Nov 03, 2007 4:20 pm

Post » Thu Apr 16, 2015 11:35 am

Damn! I ran into this exact same issue with my original elevator scripts. I set them up as doors so that NPC's could use the navmesh to navigate correctly, when they'd activate the "door" my quest would force them into an alias which would force a new package onto them. It seemed to work rather well, but only once. Their original package was a patrol so that they would need to use the elevator multiple times in both directions but I could never get them to reliably use it more than once.

I do vaguely recall some limited success with disabling the actor, a short pause, then re-enabling them but obviously this was not the beginning of an acceptable workaround :( (there may have also been a resurrect call in there at some stage too, I can't remember)

Gah! So close, yet so far :brokencomputer:

I'll try dig up my old mod and see what I had going on, maybe we'll be able to figure something out.

User avatar
Georgia Fullalove
 
Posts: 3390
Joined: Mon Nov 06, 2006 11:48 pm

Post » Thu Apr 16, 2015 4:18 pm

So I've found a workaround. For each package I'm using, in the "On End" script, I set the property corresponding to that package 0 (off) and set the property corresponding to the wait package to 1 (on). I also call EvaluatePackage(). So essentially whenever the actor completes any package, they initiate the wait package. So if I send to consecutive commands to perform some package (as described before) the actor does the package, begins a wait package, and then does the original package again. Seems to work well enough.

User avatar
Sarah Evason
 
Posts: 3507
Joined: Mon Nov 13, 2006 10:47 pm


Return to V - Skyrim