Mod:Creation Kit/IsActorInArrayHostileToActor - CommonArrayFunctions

Member of: Mod:Creation Kit/CommonArrayFunctions Script

Checks to see if any of the actors in the array are hostile to the specified actor.

Syntax
bool Function IsActorInArrayHostileToActor(Actor ActorToCheck, ObjectReference[] ArrayToCheck) Global

Parameters

 * ActorToCheck: The Actor we are checking hostility towards
 * ArrayToCheck: The Actors to check for hostility (any non-actors are skipped)

Return Value
True if any of the actors in the array are hostile towards the passed-in actor. False otherwise.

Examples
if CommonArrayFunctions.IsActorInArrayHostileToActor(Player, QuestActors) Debug.Trace("Better hide, they don't like the player much...") endIf