Background for Fallout 4
Member of the ObjectReference script

Description

Wiki Description

Obtains this reference's current Location.

Documentation Comment

Returns this reference's current location


Caveats

CK Wiki - Notes

  • If you want to know if the actor is in the location or any of its children, you need to use ObjectReference.IsInLocation(...).
    • For example, if you want to know if the actor is in SolitudeLocation or any of the city interiors, use IsInLocation(SolitudeLocation).
  • If you want to compare two different actors' locations TO one another, you probably want to use Location.IsSameLocation(...).
  • The vast majority of wilderness cells do not have a location, to which this function will return none if the Cell has no location assigned to it and print an error to the log.

Examples

; Is this object in the tomb?
if (TombLocationProperty == SwordProperty.GetCurrentLocation())
  Debug.Trace("The sword is in the tomb (but not a child location)!")
endIf

Auto-Generated Example

Location returnedValue = myObjectReference__toCallFunctionOn.GetCurrentLocation()

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.