Variable reference targets

Post » Fri May 13, 2011 8:53 pm

Lets say I have a bunch of NPCs following the player from various mods. I don't know who they are, but I can get their references using a ref-walk. Is there a way that I can get a known NPC to walk over to one of these 'unknown' references? In other words, can I somehow use an AI package when all I know about the target is its ref after the game is running. I don't see that I can assign a variable to a target on an AI package, but maybe there is a way to fake it, like moving an xmarker to the unknown NPC in question and having that be the destination of the package. But if the NPC is moving, will the package update the destination if the xmarker is also continually moving with the NPC? Can this be done with a token? Is there an equivalent to SetPackageTarget?

Has anyone ever used CAST? The wiki says it is not used, but I wonder if using Cast from a known NPC to an unknown NPC might work, if the effect is a 'touch' effect.

Just curious...
User avatar
Hayley Bristow
 
Posts: 3467
Joined: Tue Oct 31, 2006 12:24 am

Post » Fri May 13, 2011 6:55 pm

As far as I'm aware, http://geck.gamesas.com/index.php/Cast is just a remnant from Oblivion which no longer does anything. I've always treated it as a deprecated function and used http://geck.gamesas.com/index.php/CastImmediateOnSelf instead.

I don't think there is any way to set a package target via a script (although this could make a nice FOSE function), so your best bet would probably be to use your own suggestion of having an XMarker that follows your target NPC around, although that would mean that you can only use as many of these packages as you have spare XMarkers to use. I would expect the package to update when the XMarker is moved in much the same way as it does

Cipscis
User avatar
Connie Thomas
 
Posts: 3362
Joined: Sun Nov 19, 2006 9:58 am

Post » Fri May 13, 2011 8:42 am

Having an XMarker that you can move around to a Reference, then having a Travel package with the XMarker as the destination works great with the AddScriptPackage function. I'm doing it in several scripts, with Player, furniture, Terminals, and doors as target refs that I move the XMarker to. But I haven't tried it with moving targets - where the xmarker would need to be moved every frame or few with the moving target. That would be interesting to know - maybe re-applying the scriptpackage every .25 second or so will keep them on course if it turns out that the destination will be where the marker was when the package started.
User avatar
Claudia Cook
 
Posts: 3450
Joined: Mon Oct 30, 2006 10:22 am

Post » Fri May 13, 2011 4:48 pm

I did this for squads in the Oblivion version of Companion Share & Recruit. It works most of the time, but there's a few bugs.
Calling MoveTo on a quest target causes horrible stuttering, and any fast travel kind of breaks it as the marker doesn't move during the hours passed, but the 'leader' NPC will. Sounds like neither of those will come up, though.

Otherwise you could try UseWeapon instead of Cast? You can pass it a 'place to stand' parameter.
User avatar
Aman Bhattal
 
Posts: 3424
Joined: Sun Dec 17, 2006 12:01 am


Return to Fallout 3