What You'll Need:
- A fireball sprite (or use the "Show Animation" command).
- An event named "Fireball" created in a template map.
Creating the Fireball Event
Set Up the Fireball Event:
- Name the event "Fireball".
- Add a Movement Route command with the script shareDirection('player') to align the fireball's direction with the player's current direction.
- After setting the direction, make the fireball move forward in that direction.
- Once the movement is complete, the fireball needs to be destroyed. Switch to a new page (e.g., Page A), which will serve as the "death page". There are multiple ways to destroy the fireball event.
- On this page, you can display an animation, such as an explosion, to visually indicate the fireball's destruction.
- Always end the command list with Destroy Spawned Event, targeting "this" (i.e., the "Fireball" event).
- Add a comment <skip collision> to prevent the event from returning true in a collision check when using a conditional branch with checkCollide. If you're unfamiliar with collision checking, refer to related tutorials for more details.
- In the Fireball event's notetag field, add:<hitbox: 2, 2> to define the hitbox for checkCollide.
- <dmg: Fireball> to assign a skill named "Fireball" from the database to this event.
Spawn Fireball
Spawning the Fireball
- You already have the "Fireball" event set up, but you need to spawn it when the player presses button X.
- Use the Spawn Event command, specifying the event name as "Fireball".
- Ensure the X and Y coordinates are set to "player" to spawn the fireball at the player's location.
- Optionally, enable "Spawn in Front" if you want the fireball to appear one tile in front of the player.
Additional Notes
- Check the RPG Maker Action Combat demo for examples, as this method is used frequently there.