Mod:Creation Kit/CheckObjectReferenceAgainstArray - CommonArrayFunctions

Member of: Mod:Creation Kit/CommonArrayFunctions Script

Checks to see if the passed in reference is in the array. (Basically a wrapper around a simple find, with some None checks)

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

Parameters

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

Return Value

 * True: If the object is found
 * False: If the object is not found
 * False: If ObjectToCheck is None
 * returnValueIfArrayIsEmpty: If ArrayToCheck is Empty/None

Examples
if CommonArrayFunctions.CheckObjectReferenceAgainstArray(ShinyThing, InterestingObjects) Debug.Trace("Shiny thing is interesting!") endif