
Next, in the Begin Step event we will listen to the input. We will use these variables to store the input and set the animation speed to half. In the Create Event, let’s declare some variables: /// Create Event Last, we add the tileset sprite, and create a tileset object using it.Īs for the player object, we will create a simple top-down controller for it. As for the player, we need to create the four directional animations. Set the sprites to anything you want, or use the assets provided. The wall and the pot objects will be empty as they are used for collision and for drawing. We need to create three objects: oPlayer, oPot, and oWall. We need a scene to test the input controller, so let’s make a little one. The finished demo is also available for download at the end of the article. Here’s a link to the assets I used for the demo, if you want to follow along. Let’s begin!Įxample of the system being used for tutorials in HackyZach.
#GAMEMAKER STUDIO 2 FOR LOOP HOW TO#
In this post I will go over the basics of setting up this system and leave you with ideas on how to integrate it in your game and expand it.

There are many uses for this kind of system, such as creating cutscenes, automating tests for your game to run on a loop, acting as tutorials, ghost replaying, etc.

We can then simulate replaying the input and create a replay system. GameMaker is an engine that works with frames instead of delta time and thanks to this advantage, we can trivially record the player inputs and match them with a frame number.
