HasKeywordString - Form

SKSE Member of: Form Script

Checks to see if the specified keyword is attached to this form. (This function requires SKSE)

SyntaxEdit

bool Function HasKeywordString(string s) native

ParametersEdit

  • s: the full name of the keyword. Capitalization does not matter.

Return ValueEdit

Returns true if the form contains a keyword with the string as its editor ID.

ExamplesEdit

if (PotionProperty.HasKeywordString("vendoritemfood"))
	Debug.Notification("This is food.")
elseif (PotionProperty.HasKeywordString("VendorItemFoodRaw"))
	Debug.Notification("This is raw food.")
else
	Debug.Notification("This is a potion.")
endif

NoteEdit

In the case of duplicated keywords in ESM files, HasKeywordString checks the first instance established by load order.

See AlsoEdit