ModifyKeywordData - Location

From Creation Kit
Jump to: navigation, search

Member of: Location Script

Modifies the data attached to the specified keyword on this location by adding the passed-in data to the current value, but as a single function call so it is thread-safe.

Syntax

Function ModifyKeywordData(Keyword akKeyword, float afData)

Parameters

  • akKeyword: The Keyword to query for.
  • afData: The amount to modify the current value by.

Return Value

None.

Examples

; Add 50 to the cost keyword on this location
MyHouseProperty.ModifyKeywordData(CostKeywordProperty, 50)


; Subtract 25 from the cost keyword on this location
MyHouseProperty.ModifyKeywordData(CostKeywordProperty, -25)

Notes

  • You CAN modify keyword data on locations which do not have that keyword in the master file. This may be confusing. Here is an example:
    • If a location does not have a keyword, and you modify keyword data on it (add 10 for example) then:
      • LocationHasKeyword condition will return false and
      • GetKeywordDataForLocation for that keyword will return 10 (which is 0 + 10)

See Also