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
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!"
3 - Setup event Fireball
That was very simple, right?