SoulHow to code in GML (Game Maker): Part 2
NOTE: Comments are locked. I no longer answer questions about the Game Maker tutorials on this blog; I suggest you take any questions to the Game Maker Community. For more info, view the FAQ page.
Welcome back to the SoulHow guide to coding in GML, the Game Maker Language. The first part of this article was becoming too lengthy, so I decide to split it into two different blog entries.
In part 1, we left off just as we’d created our fourth variable inside a script, and were going to use our variables to draw something on the screen.
Because we’re drawing something, we need to utilize the draw event. Therefore, click add event->
draw event. In this, place an “execute code” action
just like you did at the start of part 1. Because this code is in the draw event, anything we put here gets run when Game Maker is drawing on the screen and therefore that’s just what we can do (draw on the screen).