Jump to content

Need help detecting follower state


KillerHappyFace

Recommended Posts

I need help determining what state of 'following the player' a companion is in. Unfortunately, there are no easy variables that can tell you some of the things I'm looking for: they're spread out into 2-3 different scripts and faction alliances, some specific to each of the followers.

 

So, I'd like some help figuring out the best ways to tell a script if X companion has been hired, is waiting, is sandboxing, etc. Here are my guesses:

 

I'll use Boone as an example for these, but eventually I'd like to make a script that can be run on any companion.

Edit: corrected two small errors.

 

1) The companion is currently hired and following the player: if(BooneREF.getinfaction TeammateFaction && BooneREF.waiting==0)

 

2) The companion is sandboxing: if(BooneREF.hasitem POVSandboxToken || VNPCFollowers.bBooneL38 == 1)

This one uses the sandbox token from the Companion Sandbox Mode mod.

 

3) The companion is waiting, but not sandboxing: if(BooneREF.waiting == 1 && !(BooneREF.hasitem POVSandboxToken || VNPCFollowers.bBooneL38 == 1))

 

4) The companion is not hired: if(!(BooneREF.getInFaction TeammateFaction))

 

In addition, I'd like a little advice on the usage of the NVSE BuildRef command: can it build base id's as well (such as the id of the sandbox toke I used above), or is it restricted to ref id's?

Edited by KillerHappyFace
Link to comment
Share on other sites

Using Boone as an example is a little confusing, as most if not all of Boone's follower variables are in one single script VNPCFollowersQuestSCRIPT. The conditional logic that relies on those usually avoids checking for faction and just uses the script variables.

 

All of the companions are like that, but not all of the important follower variables are in there.

 

I'd like to check for faction as opposed to using the VNPCFollowers variables because the faction checks can apply to any follower, whereas each follower has separately named variables in VNPCFollowers.

 

I couldn't get away from using VNPCFollowers.bBooneL38, though. I'm not really familiar with how to detect packages, which would probably help. How can I detect if an NPC currently has a sandbox package running?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...