How to get current follower?

Post » Wed Jun 20, 2012 4:18 pm

So I am creating a new quest object and plan to attach a script to it to access the current follower's actor/objectreference object.... How is this done?

Thanks :)
User avatar
jesse villaneda
 
Posts: 3359
Joined: Wed Aug 08, 2007 1:37 pm

Post » Wed Jun 20, 2012 6:27 pm

If you only plan to support vanilla followers you access the Follower alias from the "DialogueFollower" quest. If you want to support multiple followers you will need to build off a mod that already supports multiple followers.
User avatar
Sista Sila
 
Posts: 3381
Joined: Fri Mar 30, 2007 12:25 pm

Post » Wed Jun 20, 2012 10:50 am

Isn't there a faction that followers are always put in, so if a mod adds a follower and wants to do it in a 'clean' manor, they add them as well?
User avatar
Sheeva
 
Posts: 3353
Joined: Sat Nov 11, 2006 2:46 am

Post » Thu Jun 21, 2012 12:57 am

That depends how you plan on "getting" the follower, if you want to retrieve their actor reference for a script you won't be able to do it through faction. If your just wanting it as a condition then you can just check the faction. Depending what you want to do you can do some more complex methods like conditioning an additional activator off a perk and using the perk script to retrieve the actor reference, or just use plain dialogue to store their reference somewhere after you speak to them, but if you don't want that activator or dialogue then theres a problem.
User avatar
Josee Leach
 
Posts: 3371
Joined: Tue Dec 26, 2006 10:50 pm

Post » Wed Jun 20, 2012 5:35 pm

As someone whose follower mod doesn't use the vanilla faction system, I'd suggest that the best way to do it would be to check whether nearby NPCs are the player's teammate--the GetPlayerTeammate console condition or the http://www.creationkit.com/IsPlayerTeammate_-_Actor Papyrus function. Basically you could have a utility quest with like 20 reference aliases, flagged "optional" and "allow reserved," all set to fill with the nearest NPC whose GetPlayerTeammate = 1. Stop and restart that quest periodically, to catch when the player has summoned or dismissed followers.

This method should work with vanilla-system followers and custom ones, various different multifollower mods, etc.
User avatar
Tiffany Holmes
 
Posts: 3351
Joined: Sun Sep 10, 2006 2:28 am


Return to V - Skyrim