Difference between revisions of "OnLocationChange - Actor"
Jump to navigation
Jump to search
imported>Egocarib |
imported>Arthmoor (→Notes: Added note about dragons needing to land for this event to work on them.) |
||
Line 26: | Line 26: | ||
== Notes == | == Notes == | ||
*Keep in mind that [[Location|Locations]] can be large groups of multiple cells, sometimes including numerous interior and exterior cells. As a result, this event may not be ideal for use as a general purpose cell movement tracker. Try [[OnCellLoad - ObjectReference|OnCellLoad]] or [[OnCellAttach - ObjectReference|OnCellAttach]] instead. | *Keep in mind that [[Location|Locations]] can be large groups of multiple cells, sometimes including numerous interior and exterior cells. As a result, this event may not be ideal for use as a general purpose cell movement tracker. Try [[OnCellLoad - ObjectReference|OnCellLoad]] or [[OnCellAttach - ObjectReference|OnCellAttach]] instead. | ||
*This event will not be called on a dragon in flight. The dragon must first land and make contact with the navmesh before an OnLocationChange will be called. | |||
== See Also == | == See Also == | ||
*[[Actor Script]] | *[[Actor Script]] |
Revision as of 04:45, 4 May 2014
Member of: Actor Script
Event called when this actor moves from one location to another.
Syntax
Event OnLocationChange(Location akOldLoc, Location akNewLoc)
Parameters
- akOldLoc: The Location that we left (may be None).
- akNewLoc: 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
Notes
- Keep in mind that Locations can be large groups of multiple cells, sometimes including numerous interior and exterior cells. As a result, this event may not be ideal for use as a general purpose cell movement tracker. Try OnCellLoad or OnCellAttach instead.
- This event will not be called on a dragon in flight. The dragon must first land and make contact with the navmesh before an OnLocationChange will be called.