IsActorInArrayHostileToActor - CommonArrayFunctions

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: CommonArrayFunctions Script

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

Syntax[edit | edit source]

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

Parameters[edit | edit source]

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

Return Value[edit | edit source]

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

Examples[edit | edit source]

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

See Also[edit | edit source]