


AlarmsĪlarm events run after you set them. The Draw event overrides the default draw of the instance, meaning your instance won’t be drawn unless you use draw_self(). For example, functions like draw_sprite, which is used to draw a sprite at a location, or draw_rectangle, which is used to draw a rectangle, only work in the Draw event. This event is used to execute the draw codes. This is used for things you want to keep on happening. The most important and the most used event – the Step event runs every step – if your game/room speed is set to 30, a Step event will run 30 times in a second. Here you can initialize most of the stuff related to your instance. Here’s a quick introduction to the events we’ll be using the most: CreateĬode inside the Create event is executed only once: when the instance running the code is first created.

There are a lot of events to choose from in GameMaker. You put code inside an event, and when that code runs depends on the type of event you put it in. Kudos if you can read it all in one go!Ĭlick here to read the Russian translation of this guide, by Artem Darkov. After this tutorial, you’ll be able to use GML to build your own games effectively!īookmark this page now ( Press CTRL + D) as this guide is quite long and you will need to close it and come back later. It will introduce you to the basics of programming and how GML works. Welcome! This tutorial is aimed at beginners who have little to no experience in GML or programming in general.
