×
Fallout Wiki
☢  Independent Fallout Wiki Resources  Vault logo

CheckFormAgainstArray - CommonArrayFunctions

Resource:Creation Kit > CheckFormAgainstArray - CommonArrayFunctions


Member of: Resource:Creation Kit/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]

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

Parameters[edit]

  • 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]

  • 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]

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

See Also[edit]