O'Reilly logo

Beginning Lua with World of Warcraft Addons by Paul Emmerich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

C H A P T E R  4

image

Working with Game Events

This chapter is about event handlers and how to use them. An event handler is a function that is called by the game every time a specific event occurs. World of Warcraft provides a variety of events, ranging from clicks on UI elements to combat-related events. So what we need to do is tell the game that we are interested in an event and provide an event-handler function that should be called when the event occurs. Such a function is also called a callback function.

We will build three example mods in this chapter, the first of which will provide mouse-over tooltips for item, quest, and spell links in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required