Hey, everyone! Ready for more RPG Maker oddities? This time, I want to show you how to make platforming mechanics possible in your RPG Maker game, a little trick I learned a while back when I decided to make a Tomb Raider fan game in this engine. It may be a bit limited, depending on what you want, but it’s a good and simple way to make the player be able to jump upon platforms or across a gap on the floor, for example. If you want to know more about the context of this series, check out my first RPG Maker tutorial.
Disclaimer: I am using the MV version of RPG Maker, so although the logic is very similar in all versions, I’m not sure if this tutorial will work the same way for VX, VX Ace or XP. This tutorial is probably more useful to devs that are already familiar with how RPG Maker works, but if you still consider yourself a beginner regarding this engine, I’ll try to be as clear as I can so you don’t feel lost.1 So, first of all, I’m going to create a new project and change the environment a bit to fit better with today’s theme. In Map Properties → General Settings, I’ll change the Tileset to “Outside”, and in the Parallax Background section, I’ll change the Image to the “BlueSky” file. Then click “OK”.
I’ll then switch to the map editing mode and use the tileset on the left side of the screen to draw my map.
So, now our map looks like this:2 However, as you can see, our character’s initial position is right between the platforms, so we have to change that. Go to the Database menu → System tab → Starting Positions and set the Player’s position to the spot shown below. 3 If you preview your project right now, you’ll notice that our character is trapped in that section we placed it, because of the elevated platform. To allow the player to climb the platform, we need to set up a few events. Switch back to the event editing mode, create an event and name it “edge up 1”. Set the Priority to “Same as characters” and the Trigger to “Player Touch”. 4 Now, inside Contents → Event Commands → Conditional Branch click on the third page, select Character and set it up to “Player is facing Right”, then click “OK”. This command will create an if statement so the player can only climb on the platform if facing the right direction. 5 Inside the command we just created, open the Event Commands window again, and on the second page, select Set Movement Route. Make sure that Player is selected on the top left corner of the window. Click on the Jump button and set the Offset like this:
Click on both “OK” buttons. Right now, what the event is doing is making the player jump to a certain coordinate once it touches the event. But we’re not done yet.6 Below the player’s movement route, still inside the if statement, open the Event Commands window, on the first page, and click on the Control Switches command. Inside Single, create a switch called “climbed”. This switch is needed because the event has to know when the player is on a higher platform, and when they’re not; otherwise, it won’t work properly. 7 Our event needs a second page now. Create a page in the event by clicking on New Event Page. Go to Conditions > Switch and select the “climbed” switch.
Now you can click on “OK” and place the event on this tile:
Now, if you test the game, you’ll see that our character is climbing the platform!8 However, you surely noticed, once you’re up there, you can’t go down. So let’s open the “edge up 1” event again. We will then copy the entire if statement from the event’s first page into the second page and make some alterations. First: edit the if command itself, so now the player has to be facing left. Then, inside the player’s movement route, change the Offset of Jump to X: -1 and Y: 0. Now you need to edit the “climbed” switch, so it’s set to turn off. Finally, leave the Priority as “Below characters” and change the Trigger to “Player Touch”. The second page of our event should look like this:
If you test the game now — et voilà! — you can go up and down the platform!9 The next step is to copy the “edge up 1” event, paste it on the tile right beside it (shown below) and name it “edge up 2”.
The changes that we’ll need to make in this second event are basically just to invert some of the commands of each page. Both if statements have to be swapped, just as the Set Movement Route commands inside them. See what happens now:
Easy, right? But now our character faces another challenge: to jump the gap ahead. Well, that’s even easier.10 Make a copy of “edge up 1” and name it “cliff edge 1”, then make a copy of “edge up 2” and call it “cliff edge 2”. Place those new events on the tiles shown below:
Delete the second event page of both of those events and set their Priorities to “Below characters”. Change the Set Movement Route command of “cliff edge 1” to X: 3 and Y: 0, and do the same thing in “cliff edge 2”, but the X value will be -3. The last step is to delete the Control Switches commands from both events. Here’s the result:
And that’s it! A few simple events that you can use in many creative ways in your RPG Maker game and make it unique. I hope this tutorial was useful to you, and until the next one!