Mod:Creation Kit/HasCommonParent - Location

Member of: Mod:Creation Kit/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
if (MyHouseProperty.HasCommonParent(JoesHouseProperty)) Debug.Trace("My house and Joe's house have a common parent") endIf if (MyHouseProperty.HasCommonParent(JoesHouseProperty, TownProperty)) Debug.Trace("My house and Joe's house have a common parent that is a town") endIf
 * Do the two locations have a common parent?
 * Do the two locations have a common parent that is a town?