Mod:Creation Kit/CheckObjectReferenceAgainstReferenceAliasArray - CommonArrayFunctions

Member of: Mod:Creation Kit/CommonArrayFunctions Script

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

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

Parameters

 * 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

 * 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
if CommonArrayFunctions.CheckObjectReferenceAgainstReferenceAliasArray(ShinyThing, QuestObjectAliases) Debug.Trace("Shiny thing is a quest object!") endif