Callbacks
Introduction
Name
Description
📚 Description and Example
// Executes a callback function after time (in seconds)
App.runLater(callback, time: number)
// Executes a callback function when a player touches a tile at that location
App.addOnTileTouched(x: integer, y: integer, callback)
// Executes when a player comes in contact with a specific area
App.addOnLocationTouched(name: string, callback)
// Executes when a player presses a certain key
App.addOnKeyDown(keycode : number, callback);
// Executes a callback at a specified time interval (ms)
setTimeout(callback, time: number)
// Executes a callback after time (ms)
setInterval(callback, time: number)
// Executes a function after pressing a custom button in the mobile environment
App.addMobileButton(anchor: number, posX: number, posY: number, function(player){} )
// Adds or deletes a punch button in the mobile environment
App.putMobilePunch(enable: boolean = true)
// Adds a punch button using a image loaded
App.putMobilePunchWithIcon(icon: ScriptDynamicResource)runLater
Name
Type
Description
addOnTileTouched
Name
Type
Description
addOnLocationTouched
Name
Type
Description
addOnKeyDown
Name
Type
Description
setTimeout
Name
Type
Description
setInterval
Name
Type
Description
addMobileButton
Name
Type
Description
putMobilePunch
Name
Type
Description
putMobilePunchWithIcon
Name
Type
Description
Appendix
Last updated
Was this helpful?



