🦸🏻 Player: Create Ranged Weapon

In this tutorial, I'll show you how to make a bow weapon. This tutorial can also apply to all other types of ranged abilities.

I don't have a character sprite sheet for using a bow weapon, so I'll only demonstrate the arrow being shot from the player. We'll do the following: When the player presses A, we'll spawn an event named "Arrow" from the template map at the player's position. This will only happen if the player has an Arrow item in their inventory.


Now, let's create the Arrow event in the template map.

We'll continue using the notetag <weaponAttack> from the previous tutorial. Then, we'll create a Movement Route with the following commands:
  • setMoveSpeed: To make the arrow travel faster.
  • shareDirection('player'): To align the arrow's direction with that of the player.
  • Change the graphic to an arrow and make it move forward.
  • After moving 7 steps, the arrow will destroy itself.


Demonstration:
1. Event is newly spawned. All events when created initially has direction Down
2. Match the direction of the event to be the same as player
3. Change graphic of the event to Arrow (I don't have one so I use Actor1)
4. Make the event move forward


This way, you won't need to create four conditional branches to check the player's direction and adjust the arrow's movement to go left, right, up, or down accordingly. Now, what if you want the arrow to destroy itself when it collides with an enemy?

Let's create a new common event. When this event (the arrow) collides with any event tagged with the <enemy> notetag, it will destroy itself immediately.


Then, in the arrow event, we need to add a comment <passive: Arrow Collision (the name)> or <passive: 5 (the id)>. This indicates that when this arrow event is on the map, it will run the "Arrow Collision" common event in parallel. This is similar to the feature I introduced in tutorial 01, "How to create an enemy," but this method is manual and will only be activated on the page containing the comment.


5 RPG Maker Action Combat Manual: 🦸🏻 Player: Create Ranged Weapon In this tutorial, I'll show you how to make a bow weapon. This tutorial can also apply to all other types of ranged abilities. I don...
< >