HasCommonParent - Location

From the CreationKit Wiki
Jump to navigation Jump to search

Member of: Location Script

Returns if this location and the other have a common parent (filtering with a keyword, if provided). If the locations are identical, the function will return false.

Syntax[edit | edit source]

bool Function HasCommonParent(Location akOther, Keyword akFilter = None) native

Parameters[edit | edit source]

  • akOther: The other location to look at.
  • akKeyword: The Keyword to filter with, if provided.

Return Value[edit | edit source]

Returns if this location and the other have a common parent location, filtered on the keyword if provided.

Examples[edit | edit source]

; Do the two locations have a common parent?
if (MyHouseProperty.HasCommonParent(JoesHouseProperty))
  Debug.Trace("My house and Joe's house have a common parent")
endIf


; Do the two locations have a common parent that is a town?
if (MyHouseProperty.HasCommonParent(JoesHouseProperty, TownProperty))
  Debug.Trace("My house and Joe's house have a common parent that is a town")
endIf

See Also[edit | edit source]