GetFirstFoundFactionInArrayForActor - CommonArrayFunctions

From the Fallout4 CreationKit Wiki
Revision as of 15:59, 1 December 2015 by imported>Plplecuyer (Created page with "Category:Scripting Category:Papyrus '''Member of:''' CommonArrayFunctions Script Finds and returns the first faction in the array that the actor belongs to. == Syn...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Member of: CommonArrayFunctions Script

Finds and returns the first faction in the array that the actor belongs to.

Syntax[edit | edit source]

Faction Function GetFirstFoundFactionInArrayForActor(Actor ActorToCheck, Faction[] ArrayToCheck) Global

Parameters[edit | edit source]

  • ActorToCheck: The Actor whose factions we are examining.
  • ArrayToCheck: The Faction array we are looking in

Return Value[edit | edit source]

The first faction in the array the actor is a member of, or None if not found, the actor is none, or the array is empty or none.

Examples[edit | edit source]

Faction curFaction = CommonArrayFunctions.GetFirstFoundFactionInArrayForActor(FriendlyRaider, HostileFactions)
if curFaction
  FriendlyRaider.RemoveFromFaction(curFaction) ; make the raider slightly more friendly...
endIf

See Also[edit | edit source]