IsInLocation - ObjectReference
Revision as of 17:04, 29 June 2013 by imported>Thingy Person (→Syntax)
Member of: ObjectReference Script
Checks to see if this object is in the specified location, or a child of the specified location.
Syntax
bool Function IsInLocation(Location akLocation)
Location currLoc = GetCurrentLocation()
if currLoc == None
return false
else
return akLocation.IsChild(currLoc) || currLoc == akLocation
endif
endFunction
Parameters
- akLocation: The Location to check.
Return Value
Whether this reference is in the specified location.
Examples
; Is the box in the house location?
if Box.IsInLocation(House)
Debug.Trace("Box is in the house!")
endIf