OnLocationChange - Actor

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: Actor Script

Event called when this actor moves from one location to another.

Syntax[edit | edit source]

Event OnLocationChange(Location akOldLoc, Location akNewLoc)

Parameters[edit | edit source]

  • akOldLoc: The Location that we left (may be None).
  • akNewLoc: The Location that we entered (may be None).

Examples[edit | edit source]

Event OnLocationChange(Location akOldLoc, Location akNewLoc)
  if (Game.GetPlayer().GetCurrentLocation() == akOldLoc)
    Debug.Trace("We have left the player's location!")
  endIf
endEvent

See Also[edit | edit source]