Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Gamemaker Essentials

You're reading from   Gamemaker Essentials Learn all the essential skills of GameMaker: Studio and start making your own impressive games with ease

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher
ISBN-13 9781784396121
Length 154 pages
Edition 1st Edition
Arrow right icon
Toc

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime