autodoc_client_functions
JO Functions > jo.player.didMoveSinceLastCall()
A function to know if the player moved since the last called of the function <br>
JO Functions > jo.player.didMoveSinceLastCall() > Syntax
jo.player.didMoveSinceLastCall(id)
JO Functions > jo.player.didMoveSinceLastCall() > Parameters
id : string
Unique ID of call
JO Functions > jo.player.didMoveSinceLastCall() > Return Value
Type : boolean
trueif the player moved since the last call
JO Functions > jo.player.didMoveSinceLastCall() > Example
local move = jo.player.didMoveSinceLastCall('moveId')
print(move)
Wait(2000)
move = jo.player.didMoveSinceLastCall('moveId')
print(move)
JO Functions > jo.player.forceUpdate()
A function to force the update of module value <br>
JO Functions > jo.player.forceUpdate() > Syntax
jo.player.forceUpdate()
JO Functions > jo.player.forceUpdate() > Example
print(jo.pl.coords)
jo.pl.forceUpdate()
print(jo.pl.coords)
JO Functions > jo.player.move()
A function fired when the player move every 100ms <br>
JO Functions > jo.player.move() > Syntax
jo.player.move(cb, interval)
JO Functions > jo.player.move() > Parameters
cb : function
function to fired when the player moves
interval : integer <BadgeOptional />
minimal duration in ms between two executions. Can't be lower than 100ms
JO Functions > jo.player.move() > Example
jo.player.move(function()
print('MOVE !')
end, 1000)
-- OR --
jo.pl.move(function()
print('MOVE !')
end, 1000)
JO Functions > jo.player.instanceChanged()
A function fired when the local player's routing bucket (instance) changes. <br> Also fires immediately if the current instance is already known, or requests it <br> from the server if not — guaranteeing exactly one initial call per registration. <br>
JO Functions > jo.player.instanceChanged() > Syntax
jo.player.instanceChanged(cb)
JO Functions > jo.player.instanceChanged() > Parameters
cb : function
function called with
(newInstance, oldInstance)