Difference between revisions of "IsChild - Location"
Jump to navigation
Jump to search
imported>Terra Nova2 m (Undo revision 45574 by Terra Nova (talk)) |
imported>Lisselli m (→Notes: clarified the note on this.) |
||
Line 25: | Line 25: | ||
== Notes == | == Notes == | ||
* | * This function will return true if the TamrielLocation is the calling location, even though the Parent location set on the passed-in (akOther) location's form is not set to TamrielLocation. This is because this function checks whatever is the parent location of the parent location of the passed-in location. To better explain this: RiverwoodLocation's parent location is WhiterunHoldLocation, while WhiterunHoldLocation's parent is TamrielLocation. This function will return true for either of them for RiverwoodLocation. So, if you want to know if a particular is a parent, do not use Tamriel unless you really want to know if Tamriel is the parent. | ||
== See Also == | == See Also == | ||
*[[Location Script]] | *[[Location Script]] |
Revision as of 04:11, 7 August 2017
Member of: Location Script
Returns if the other location is a child of this one. If they are the same location, the function returns false.
Syntax
bool Function IsChild(Location akOther) native
Parameters
- akOther: The other location to look at.
Return Value
Returns if the other location is a child of this one.
Examples
; Is my house a child of the Batooine location?
if (BatooineProperty.IsChild(MyHouseProperty))
Debug.Trace("My house is a child of the Batooine location")
endIf
Notes
- This function will return true if the TamrielLocation is the calling location, even though the Parent location set on the passed-in (akOther) location's form is not set to TamrielLocation. This is because this function checks whatever is the parent location of the parent location of the passed-in location. To better explain this: RiverwoodLocation's parent location is WhiterunHoldLocation, while WhiterunHoldLocation's parent is TamrielLocation. This function will return true for either of them for RiverwoodLocation. So, if you want to know if a particular is a parent, do not use Tamriel unless you really want to know if Tamriel is the parent.