Callbacks

What is a callback?
Callbacks are commands that execute when an event occurs. The callback package has several commands:
 * add : creates a new callback at a given event type


 * Example: callback add onStart say beta "The start event has launched"
 * remove : removes a callback from the event
 * Example: callback remove 0 onStart

Callback Event Types

 * onLoad : When the game finishes loading
 * onStart : When the player takes control of Beta for the first time.
 * gameLoop : Everytime the game loop executes
 * onWin : When the game is won
 * onFail : When the game is lost
 * onSpawn : When the player is spawned
 * onDeath : When the player dies
 * onTick : When the targeted timer ticks
 * onTimeout : When the targeted timer runs out
 * atTick : When a specific tick count is reached ono the target timer
 * onChange : Whenever the targeted counter's count changes
 * atCount : When a specific count is reached by the targeted counter
 * onTap : When the targeted object is tapped ( clicked )
 * onCollect : When the targeted object is collected

Examples
Adding callbacks:


 * callback add gameLoop add ball
 * callback add gameLoop add ball