GetFirstFoundFactionInArrayForActor - CommonArrayFunctions

Member of: CommonArrayFunctions Script

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

SyntaxEdit

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

ParametersEdit

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

Return ValueEdit

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.

ExamplesEdit

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

See AlsoEdit