CheckFormAgainstArray - CommonArrayFunctions

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: CommonArrayFunctions Script

Checks to see if the passed in form is in the array. (Basically wrapping a find call with a couple of additional checks to handle None)

Syntax[edit | edit source]

bool Function CheckFormAgainstArray(Form FormToCheck, Form[] ArrayToCheck, bool returnValueIfArrayIsEmpty = false) global

Parameters[edit | edit source]

  • FormToCheck: The Form to look for
  • ArrayToCheck: The Form array we are looking in
  • returnValueIfArrayIsEmpty: If the array is empty, return this.
    • Default: false

Return Value[edit | edit source]

  • True: If the Form is in the array
  • False: If the Form is not in the array
  • False: If Form is None
  • returnValueIfArrayIsEmpty: If ArrayToCheck is Empty/None

Examples[edit | edit source]

if CommonArrayFunctions.CheckFormAgainstArray(Car, FuelEfficientCars)
   Debug.Trace("The car is fuel efficient!")
endIf

See Also[edit | edit source]