[DEV SERVER] Loading description...
Caveats
Parameters
KeywordakKeyword=NONE
CK Wiki Description
if supplied, it uses the keyword to test if the locations share a parent with that keyword, or one of the locations has the keyword and is a parent of the other.
- Default:None
Examples
; Is myLocationProperty the same as MarylandLocationProperty?
if (MyLocationProperty.IsSameLocation(MarylandLocationProperty))
Debug.Trace("MyLocationProperty is MarylandLocationProperty.")
endIf; Is myLocationProperty the same as MyOtherLocationProperty OR are both locations in the same location with the
; keyword "LocTypeCountry" stored in LocTypeProperty?
if (MyLocationProperty.IsSameLocation(MyOtherLocationProperty, LocTypeProperty))
Debug.Trace("MyLocationProperty is MyOtherLocationProperty or we are in the same Country " + \
"(or one us is the Country the other one is in).")
endIf; Is the player in a location that is WhiterunLocation or a location who has WhiterunLocation as a parent
; (when WhiterunProperty points to WhiterunLocation and KeywordHoldProperty points to LocTypeHold keyword)
if Game.GetPlayer().GetCurrentLocation().IsSameLocation(WhiterunProperty, KeywordHoldProperty)
Debug.Trace("Player is in WhiterunLocation, or a child of WhiterunLocation.")
endif; Is the player and the CourierRef (stored in pCourier) in the same settlement, town, or city (ie the "LocTypeHabitation"
; keyword stored in)pLocTypeHabitation
if pCourier.getCurrentLocation().IsSameLocation(Game.GetPlayer().getCurrentLocation(), pLocTypeHabitation)
debug.trace("WICourierScript: Courier and player are in same habitation.")
else
debug.trace("WICourierScript: Courier and player are not in same habitation.")
endifAuto-Generated Example
Location myLocation__akOtherLocation
Keyword myKeyword__akKeyword
bool returnedValue = myLocation__toCallFunctionOn.IsSameLocation(myLocation__akOtherLocation, myKeyword__akKeyword)Related Pages
- Location
- Location.HasCommonParent(...)
- Location.IsChild(...)
Additional References
View this function’s page on the Fallout 4 Creation Kit Wiki
