HasKeyword - ObjectReference

From Creation Kit
Jump to: navigation, search

Member of: ObjectReference Script

Queries if a reference has a keyword in its list of keywords. This basically operates the same way as HasKeyword - Form, but can be run on inventory objects.

Syntax

bool Function HasKeyword(Keyword akKeyword) native

Parameters

  • akKeyword: The Keyword to check for.

Return Value

True if the passed in keyword is in the reference's list of keywords. False otherwise.

Examples

; Determine if an actor's mobility (right leg) is injured
if(ActorToCheck.HasKeyword(InjuredMobilityRightKeywordProperty))
  Debug.Trace("Actor's right leg is injured")
endIf

See Also