Book Image

Gamemaker Essentials

4 (1)
Book Image

Gamemaker Essentials

4 (1)

Overview of this book

Table of Contents (16 chapters)

Events


When it comes to objects, it is extremely important to know what an event is. This is due to pretty much everything in a GameMaker game happening within some sort of event.

In general, an event is often referred to as a thing that happens, or takes place; often times, the event is of some sort of importance. For example, you may attend an athletics event. In GameMaker, it is much the same. GameMaker has a number of predefined events that allow us to easily make things happen when certain other events take place or when something happens in the game, for example, a mouse button being pressed.

As an example, we will look at the first event of any object, the create event. The create event is triggered when an instance is created within a room. It is always the first event to be executed. The create event is commonly used to initialize variables for later use in an instance, for example, a score variable.

How is an event triggered? In most cases, it is automatically triggered by GameMaker...