CheckActorAgainstFactionArray - CommonArrayFunctions
Revision as of 15:56, 1 December 2015 by imported>Plplecuyer
Member of: CommonArrayFunctions Script
Loops through an array of Factions and checks if the specified actor in in any of them.
Syntax[edit | edit source]
bool Function CheckActorAgainstFactionArray(Actor ObjectToCheck, Faction[] ArrayToCheck, \
bool returnValueIfArrayIsEmpty = false) global
Parameters[edit | edit source]
- ObjectToCheck: The Actor whose factions we are looking for
- ArrayToCheck: The Faction array we are looking in
- returnValueIfArrayIsEmpty: If the array is empty, return this.
- Default: False
Return Value[edit | edit source]
- True: If the ObjectToCheck is in one of the factions in ArrayToCheck
- False: If the ObjectToCheck has none of the factions in ArrayToCheck
- False: If ObjectToCheck is None
- returnValueIfArrayIsEmpty: If ArrayToCheck is Empty/None
Examples[edit | edit source]
if CommonArrayFunctions.CheckActorAgainstFactionArray(Dogmeat, HostileFactions)
Debug.Trace("Dogmeat is in a hostile faction!")
endIf