Jump to content

(Help) a script for detecting followers in a cell


Delzaron

Recommended Posts

Hi

 

I need a script for checking if, in a cell, there is a follower of several...

 

hese follwoers will have their factions modified, and will fill some aliases.

It's important, or they will kick rieklings asses, and destroy the quest.

 

Thanks in advance

Link to comment

Hi

 

I need a script for checking if, in a cell, there is a follower of several...

 

hese follwoers will have their factions modified, and will fill some aliases.

It's important, or they will kick rieklings asses, and destroy the quest.

 

Thanks in advance

Add a quest, add enough aliases to the quest to get all the followers (10 should be more than enough but you could go to 15 or 20 to be absolutely sure)).

Then in each alias add the "GetPlayerTeammate" condition or use a pair of conditions GetInFaction for the CurrentFollowerFaction and GetFactionRank = 1 for the CurrentFollowerFaction. You can use a script to start that quest then check all the aliases in that quest, they should be filled with references to each follower or equal to NONE. Once you've built your list of followers stop that quest via script.

 

As long as you set that quest as repeatable you can get a quick list of followers using it any time you like.

Link to comment

 

Hi

 

I need a script for checking if, in a cell, there is a follower of several...

 

hese follwoers will have their factions modified, and will fill some aliases.

It's important, or they will kick rieklings asses, and destroy the quest.

 

Thanks in advance

Add a quest, add enough aliases to the quest to get all the followers (10 should be more than enough but you could go to 15 or 20 to be absolutely sure)).

Then in each alias add the "GetPlayerTeammate" condition or use a pair of conditions GetInFaction for the CurrentFollowerFaction and GetFactionRank = 1 for the CurrentFollowerFaction. You can use a script to start that quest then check all the aliases in that quest, they should be filled with references to each follower or equal to NONE. Once you've built your list of followers stop that quest via script.

 

As long as you set that quest as repeatable you can get a quick list of followers using it any time you like.

 

 

hum... that's not help so much...

 

I need a function, which is able to detect a follower in a cell, and to affect these followers to aliaises.

 

What you write is the way to fill the aliases, but I don't understand how I will be able to fill the aliases....

 

 

edit : I have something like that... but it don't really work...

 

Cell theCell = PlayerRef.getParentCell()

int num = theCell.getNumRefs(62) as int ; "A cast is necessary here"

while num

  num -= 1

  Actor act = theCell.getNthRef(num, 62) As Actor  ; "A cast is necessary here"

  if (act && !act.isDisabled() && act!=PlayerRef && act!=akspeaker && !act.isinFaction(aTIDIbnSlaveFaction))

    ; " You want first to check if the actor exists, then if it is NOT the player, and if it is NOT your RRH. And then the faction"

    ; "Got it"

    Followerenslave

    return

  endIf

endWhile

Link to comment

WaxenFigure is right. I tried 'finding' followers with pure Papyrus before - you'd just end up with a lot of frustration.

 

Quest aliases is the way to go. Make a new quest (AliasQuest) without Start Game Enabled. Added a few follower aliases (F1, F2, F3) with the conditions that Waxen mentioned - tick the Optional flag for all of them. Add whatever package you want to these aliases

 

Then in your main script 

 

Quest property AliasQuest auto

ReferenceAlias property F1 auto

 

AliasQuest.Start()

F1, F2, F3 should now be filled (if follower are actually around) and be using whatever packages you add to them.

 

If you'd rather not use the conditional fill aliases for the package/ need to link that alias to an alias in your current quest so that your current quest's alias handles AI instead, just add:

 

CurrentQuestAlias.ForceRefTo(F1.GetReference())

 

To get the aliases to check again:

 

AliasQuest.Stop()

AliasQuest.Reset()

AliasQuest.Start()

 

I guess you can use a cloak spell or something along that as well - but would be very inefficient compared to aliases

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use