Background for Fallout 4
Member of the Actor script
eventOnLocationChange(LocationakOldLoc, LocationakNewLoc)

Description

Wiki Description

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

Documentation Comment

Event that is triggered when this actor changes from one location to another


Parameters

  1. LocationakOldLoc

    CK Wiki Description

    The Location that we left (may be None).

  2. LocationakNewLoc

    CK Wiki Description

    The Location that we entered (may be None).


Examples

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

Auto-Generated Example

Scriptname MyCoolScript extends Actor

event OnLocationChange(Location akOldLoc, Location akNewLoc)
    Debug.trace("Event received - OnLocationChange: akOldLoc = " + akOldLoc + " akNewLoc = " + akNewLoc)
endEvent

Related Pages


Additional References

View this event’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.