GetPlayerFollowers - Game

From the Fallout4 CreationKit Wiki
Revision as of 10:35, 31 July 2013 by imported>Deazurain (→‎Return Value: added array link)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Member of: Game Script

Returns an array of the player's followers.

Syntax

Actor[] Function GetPlayerFollowers() native global

Parameters

None

Return Value

Actor array containing all actors that are either:

  1. Running an AI procedure that followers the player (e.g. Follow, Range).
  2. Running a package that is flagged to treat the actor as a player-follower (e.g. a Sandbox on a player companion).

Examples

   Actor[] playerFollowers = Game.GetPlayerFollowers( )
   int index = 0
   while (index < objects.Length)
     ;playerFollowers[index].DoSomething()
     currentElement += 1
   endWhile

See Also