GetFirstFoundKeywordInArrayForLocation - CommonArrayFunctions

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: CommonArrayFunctions Script

Finds and returns the first keyword in the array that is attached to the specified location.

Syntax[edit | edit source]

Keyword Function GetFirstFoundKeywordInArrayForLocation(Location LocationToCheck, Keyword[] ArrayToCheck) Global

Parameters[edit | edit source]

  • LocationToCheck: The location we are checking
  • ArrayToCheck: The keywords to check

Return Value[edit | edit source]

The first keyword in the array applied to the location, or None if none of them are attached, the location is None, the array is None, or the array is empty.

Examples[edit | edit source]

Keyword theKeyword = CommonArrayFunctions.GetFirstFoundKeywordInArrayForLocation(PlayerLocation, LocationKeywords)
if theKeyword
  theKeyword.SendStoryEvent() ; fire off some quest based on the keyword
endIf

See Also[edit | edit source]