Opinion on technique to use to pick packages that aren't in

Post » Wed Jun 20, 2012 1:26 am

Basically, the idea was to have an Actor with many of its instances in the world and many overlapping packages. Each instance would then select a different package that isn't in use by other instances so that each one, picks a different package.

My idea was to have a script on the Actor, set a conditional variable to 1 that represents the first package when the OnPackageStart ran, then set it back to 0 when OnPackageEnds ran. This would flag that Package as being already "taken". Then I'd have conditions on the Packets to only run if the variable is 0.

I couldn't get this to work. I suspect its something about the sequence of events not being what I expected (i.e. the engine first checking the conditions on the Packages for all Actors and then running the OnPackageStart on all Actors instead of this: Actor 1 -> check conditions -> pick Package -> OnPackageStart -> ... -> Actor 2 -> check conditions -> ...) or something else I'm not seeing.

So, if you were to do something like this, what technique do you think should be used? Or forget about it altogether and just create as many Actors as I need instead of creating multiple instances of the same Actor? (The reason I'm trying to create only one Actor is because they're all basically the same except the main package they're supposed to run)
User avatar
Vicky Keeler
 
Posts: 3427
Joined: Wed Aug 23, 2006 3:03 am

Post » Tue Jun 19, 2012 8:06 pm

What about going the opposite direction? just create various aliases with different packages and equip different aliases in the only instance of the same actor as you fit.
User avatar
Naughty not Nice
 
Posts: 3527
Joined: Sat Nov 04, 2006 6:14 am


Return to V - Skyrim