onPlayerPositionChange
Getting triggered when the player position changes
Prototypes
onPlayerPositionChange(callback) -- callback = function(newPos, oldPos)
Parameters
-
- function(newPos, oldPos): callback function
- newPos: position object of new player position (contains x, y, z)
- oldPos: position object of old player position (contains x, y, z)
- function(newPos, oldPos): callback function
Usage
onPlayerPositionChange(function(newPos, oldPos)
info("New Pos: (X: " .. newPos.x .. " Y: " .. newPos.y .. " Z: " .. newPos.z) -- Displays newPos (as info text in the macro window)
info("Old Pos: (X: " .. oldPos.x .. " Y: " .. oldPos.y .. " Z: " .. oldPos.z) -- Displays oldPos (^)
end)
No Comments