🦸🏻 Player: Player collide with objects

With this tutorial, you'll learn how to enable the player to collide with objects in your game. In this example, we'll make it so that when the player collides with an event tagged with <fireball>, a message displays: "Oh, I'm hurt!" Let's get started!

1 - Setup the Common Event


To ensure the player constantly checks for collisions, create a common event that continuously runs to detect collisions between the player and the fireball event. Make sure to activate the switch that triggers this common event at some point in your game, such as at the start. If this switch is not turned ON, the common event will not run.

This is a fundamental feature of RPG Maker eventing. If it’s confusing, think of it like flipping a switch to turn on a light bulb. You don't flip the switch -> No light. You flip the switch -> Light on.




2 - Setup collision detection


Now, let’s configure the collision detection using a conditional branch:

checkCollide(target, notetag)


Since we’re checking if the player is colliding with an event tagged with <fireball>, set the target to 'player' and the notetag to '<fireball>'.

Under the "true" section of the conditional branch, add a Show Text command with the message "Oh, I'm hurt!"
 
You may notice I added a Wait 1 frame command outside the conditional branch. This ensures the common event runs every other frame, rather than constantly, which is a useful performance optimization trick.




3 - Setup event Fireball


Now, create an event and add the notetag <fireball> to it. Then, set this event to move toward the player. When the event collides with the player, the message "Oh, I'm hurt!" will display!


That was very simple, right?
5 RPG Maker Action Combat Manual: 🦸🏻 Player: Player collide with objects With this tutorial, you'll learn how to enable the player to collide with objects in your game. In this example, we'll make it so th...
< >