Difference between revisions of "Event Handler Functions"

29 bytes added ,  22:23, 3 January 2012
m
no edit summary
imported>8asrun6aer
m
imported>8asrun6aer
m
Line 1: Line 1:
An event handler is a user-defined function designed to respond to game events. Rather than calling the function directly, the scripter uses [[SetEventHandler]] to register it as a handler for a specific event. When the associated event occurs during gameplay, OBSE will invoke any handlers for that event, passing information about the event to the function through its arguments.
An event handler is a [[User_Functions|user-defined function]] designed to respond to game events. Rather than calling the function directly, you use [[SetEventHandler]] to register your user defined function as a handler for a specific event. Then, when ever the associated event occurs during gameplay, OBSE will invoke your script, passing information about the event to your function through its arguments.


Events include block types such as "OnHit", "OnDeath", and so on, as well as other events involving loading, saving, and exiting the game. Each event expects its handlers to accept a specific set of arguments. The supported events, including any required arguments (listed in the order in which they should appear in the function definition) are listed below:
Events include block types such as "OnHit", "OnDeath", and so on, as well as other events involving loading, saving, and exiting the game. Each event expects its handlers to accept a specific set of arguments. The supported events, including any required arguments (listed in the order in which they should appear in the function definition) are listed below:
Anonymous user