User Tools

Site Tools


addons:events

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
addons:events [2017/04/21 19:46]
atom0s
addons:events [2017/04/21 19:54]
atom0s
Line 36: Line 36:
 ashita.register_event('​load',​ loadfunction);​ ashita.register_event('​load',​ loadfunction);​
 </​code>​ </​code>​
 +
 +----
 +
 +===== Built-In Events =====
 +
 +Below, you will find documentation for the built-in events that the Ashita addons library exposes to all addons. Please be aware of the returns and such of each event as incorrect returns can cause log spam of warnings/​errors as well as potential client crashes! Be sure to test your addons thoroughly before having others use them!
  
 ---- ----
Line 194: Line 200:
     * or     * or
     * **string, number** - The modified message and mode to use instead of the current ones.     * **string, number** - The modified message and mode to use instead of the current ones.
 +
 +----
 +==== Event: prerender ====
 +
 +Called when the client is about to start rendering. (Called just after D3D8 BeginScene.)
 +
 +<code lua>
 +ashita.register_event('​prerender',​ function()
 +    print('​Prerender event fired!'​);​
 +end);
 +</​code>​
 +
 +**Parameters** \\
 +    * None
 +
 +**Returns** \\
 +    * None
 +
 +----
 +==== Event: render ====
 +
 +Called when the client has finished its rendering and other tools can now render. (Called during D3D8 EndScene.)
 +
 +<code lua>
 +ashita.register_event('​render',​ function()
 +    print('​Render event fired!'​);​
 +end);
 +</​code>​
 +
 +**Parameters** \\
 +    * None
 +
 +**Returns** \\
 +    * None
 +
 +----
 +==== Event: timerpulse ====
 +
 +Called when the client is rendering the scene, used for Addons Lua timers library.\\
 +//(Addons should not register to this event themselves, it is used for the timers library.)//
 +
 +<code lua>
 +ashita.register_event('​timerpulse',​ function()
 +    print('​Timer pulse event fired!'​);​
 +end);
 +</​code>​
 +
 +**Parameters** \\
 +    * None
 +
 +**Returns** \\
 +    * None
 +
  
 ---- ----
addons/events.txt · Last modified: 2017/04/22 00:10 (external edit)