Difference between revisions of "GetFactions - Actor"
Jump to navigation
Jump to search
imported>TidalWraith (Using a new format for this one let me know what you think.) |
imported>Bug64 m (standardized the page) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
Returns an array of Factions the Actor is a member of filtered by the Actors rank. (Maximum Range of -128 to 127) | |||
== Syntax == | |||
::<source lang="papyrus">Faction[] Function GetFactions(int minRank, int maxRank) native</source> | ::<source lang="papyrus">Faction[] Function GetFactions(int minRank, int maxRank) native</source> | ||
=== Parameters === | === Parameters === | ||
*minRank: The minimum rank | *minRank: The minimum rank the Actor must be within the faction. | ||
*maxRank: The maximum rank | *maxRank: The maximum rank the Actor can be within the faction. | ||
=== Return Value === | === Return Value === | ||
A [[Faction Script| Faction]] array is returned containing all factions the actor is a part of within the specified rank range | A [[Faction Script| Faction]] array is returned containing all factions the actor is a part of within the specified rank range. | ||
== Examples == | |||
<source lang="papyrus"> | |||
;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) | |||
</source> | |||
== See Also == | == See Also == | ||
* [[AddToFaction - Actor| AddToFaction ]] | * [[AddToFaction - Actor| AddToFaction ]] |
Latest revision as of 12:17, 25 July 2015
Returns an array of Factions the Actor is a member of filtered by the Actors rank. (Maximum Range of -128 to 127)
Syntax[edit | edit source]
Faction[] Function GetFactions(int minRank, int maxRank) native
Parameters[edit | edit source]
- minRank: The minimum rank the Actor must be within the faction.
- maxRank: The maximum rank the Actor can be within the faction.
Return Value[edit | edit source]
A Faction array is returned containing all factions the actor is a part of within the specified rank range.
Examples[edit | edit source]
;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)