Difference between revisions of "GetFactions - Actor"
Jump to navigation
Jump to search
imported>TidalWraith (Added Example) |
imported>TidalWraith m (Modified Example) |
||
Line 19: | Line 19: | ||
Actor PlayerRef = Game.GetPlayer() | Actor PlayerRef = Game.GetPlayer() | ||
Faction[] PlayerFactions = PlayerRef.GetFactions(-128, 127);The maximum range allowed. | Faction[] PlayerFactions = PlayerRef.GetFactions(-128, 127);The maximum range allowed. | ||
Debug.Trace( | Debug.Trace("Player is a part of the following factions: " + PlayerFactions) | ||
</source> | </source> | ||
Revision as of 02:12, 20 June 2015
Faction[] Function GetFactions(int minRank, int maxRank) native
Returns all factions of the actor with the specified minimum and maximum ranks (maximum range of -128 to 127)
Parameters
- minRank: The minimum rank
- maxRank: The maximum rank
Return Value
A Faction array is returned containing all factions the actor is a part of within the specified rank range
Examples
;This example grabs the player, then their factions and finally prints the array of factions to the Papyrus log.
Actor PlayerRef = Game.GetPlayer()
Faction[] PlayerFactions = PlayerRef.GetFactions(-128, 127);The maximum range allowed.
Debug.Trace("Player is a part of the following factions: " + PlayerFactions)