CheckObjectAgainstKeywordArray - CommonArrayFunctions
Member of: CommonArrayFunctions Script
Loops through an array of Keywords and checks if the specified ObjectReference has any of them.
SyntaxEdit
bool Function CheckObjectAgainstKeywordArray(ObjectReference ObjectToCheck, Keyword[] ArrayToCheck, \
bool returnValueIfArrayIsEmpty = false) global
ParametersEdit
- 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 ValueEdit
- 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
ExamplesEdit
if CommonArrayFunctions.CheckObjectAgainstKeywordArray(Jackhammer, MeleeWeaponKeywords)
Debug.Trace("The jackhammer is a melee weapon!")
endif