Difference between revisions of "Event Handler Functions"
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, | 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: |