CheckActorAgainstFactionArray - CommonArrayFunctions
Member of: CommonArrayFunctions Script
Loops through an array of Factions and checks if the specified actor in in any of them.
SyntaxEdit
bool Function CheckActorAgainstFactionArray(Actor ObjectToCheck, Faction[] ArrayToCheck, \
bool returnValueIfArrayIsEmpty = false) global
ParametersEdit
- 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 ValueEdit
- 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
ExamplesEdit
if CommonArrayFunctions.CheckActorAgainstFactionArray(Dogmeat, HostileFactions)
Debug.Trace("Dogmeat is in a hostile faction!")
endIf