m
→Game Interaction: Removed link to redirect.
m (Robot: Removing selflinks) |
m (→Game Interaction: Removed link to redirect.) |
||
| Line 97: | Line 97: | ||
=== Game Interaction === | === Game Interaction === | ||
Most of the useful information comes from game events, which are all passed to the frame via the generic <OnEvent> script handler. There are literally hundreds of types of Game Events, so rather than spend a lot of time passing every event to every handler, an AddOn must register its interest in a frame receiving a certain event. This is accomplished through the [[API RegisterEvent|Frame:RegisterEvent("event")]] function, and is typically performed within the <OnLoad> or <OnShow> handlers. | Most of the useful information comes from game events, which are all passed to the frame via the generic <OnEvent> script handler. There are literally hundreds of types of Game Events, so rather than spend a lot of time passing every event to every handler, an AddOn must register its interest in a frame receiving a certain event. This is accomplished through the [[API Frame RegisterEvent|Frame:RegisterEvent("event")]] function, and is typically performed within the <OnLoad> or <OnShow> handlers. | ||
Once an event has been registered, the Frame's <OnEvent> handler will be called whenever that event occurs. | Once an event has been registered, the Frame's <OnEvent> handler will be called whenever that event occurs. | ||