Mod:Creation Kit/CheckObjectAgainstKeywordArray - CommonArrayFunctions

Member of: Mod:Creation Kit/CommonArrayFunctions Script

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

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

Parameters

 * 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

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