CheckObjectReferenceAgainstReferenceAliasArray - CommonArrayFunctions

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: CommonArrayFunctions Script

Loops through an array of ReferenceAliases and checks if any of them have the specified ObjectReference in them.

Syntax[edit | edit source]

bool Function CheckObjectReferenceAgainstReferenceAliasArray(ObjectReference ObjectToCheck, \
  ReferenceAlias[] ArrayToCheck, bool returnValueIfArrayIsEmpty = false) global

Parameters[edit | edit source]

  • ObjectToCheck: The ObjectReference we are looking for
  • ArrayToCheck: The ReferenceAlias Array we are looking in
  • returnValueIfArrayIsEmpty: If the array is empty, return this.
    • Default: false

Return Value[edit | edit source]

  • True: If the object is found in one of the aliases in the array
  • False: If the object is not found
  • False: If ObjectToCheck is None
  • returnValueIfArrayIsEmpty: If ArrayToCheck is Empty/None

Examples[edit | edit source]

if CommonArrayFunctions.CheckObjectReferenceAgainstReferenceAliasArray(ShinyThing, QuestObjectAliases)
   Debug.Trace("Shiny thing is a quest object!")
endif

See Also[edit | edit source]