CheckObjectAgainstKeywordArray - CommonArrayFunctions

From Creation Kit
Jump to: navigation, search

Member of: CommonArrayFunctions Script

Loops through an array of Keywords and checks if the specified ObjectReference has any of them.


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


  • ObjectToCheck: The ObjectReference who's Keywords we are looking for
  • ArrayToCheck: The Keyword Array we are looking in
  • returnValueIfArrayIsEmpty: If the array is empty, return this.
    • Default: False

Return Value

  • True: If the ObjectToCheck has at least one of the keywords in the array
  • False: If the ObjectToCheck has none of the keywords in the array
  • False: If ObjectToCheck is None
  • returnValueIfArrayIsEmpty: If ArrayToCheck is Empty/None


if CommonArrayFunctions.CheckObjectAgainstKeywordArray(Jackhammer, MeleeWeaponKeywords)
   Debug.Trace("The jackhammer is a melee weapon!")

See Also