CheckObjectReferenceAgainstArray - CommonArrayFunctions

From the Fallout4 CreationKit Wiki
Revision as of 15:47, 1 December 2015 by imported>Plplecuyer
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Member of: 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[edit | edit source]

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

Parameters[edit | edit source]

  • 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[edit | edit source]

  • 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[edit | edit source]

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

See Also[edit | edit source]