HasCommonParent - Location

From Creation Kit
Jump to: navigation, 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

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

Parameters

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

Return Value

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

Examples

; 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