![rpg maker xp 3d script rpg maker xp 3d script](http://www.final-rpg.com/img/img_telecharger/psp_2.jpg)
The animations will be called "attackUP", "attackLEFT", "attackRIGHT", and "attackDOWN". I'll show a sample using the same switches and variables. Then set the above code under conditional branches for each direction the player is facing, adding the animation code just before the move event. The first frame has the sword at a positive 45 degree angle from where the player is facing, the secon frame has the sword facing where the player is facind, and the third is a negatice 45 degree angle. I am not good at explaining this part, but basically, make 4 animation files. Then go to the animation editor and make each animation of the swinging sword. To do that, import the picture of a sword into the animations folder. To add more detail, make an animation of a sword swinging. Input Processing: Branch: Variable =16 Switches:=ON move route: Player (Ignore if can't move) : :$>Change Speed: 6 : :$>Change Freq.: 6 : :$>SE:'064-Swing03', 80, 130 : :$>1 Step Forward : :$>Change Speed: 4 : :$>Change Freq.: 4 for move's completion Switches:=OFF Variables:=0 :Branch End What this does is make it so that when you press D, your player moves forward one space quickly, making the sound of a sword swing.
![rpg maker xp 3d script rpg maker xp 3d script](https://assets-global.website-files.com/5efc0159f9a97ba05a8b2902/5f73030700249e7500c8bc23_xp_ss_02.jpg)
Also make a variable called "attackON", and a second switch called "swordON". Call this event "Melee attack", and the switch "Sword1". Set it to a parallel process to a switch. A swing of the sword, a flying fist, whatever! This will take two different events. Part 1: Melee attack: This is the coding for the basic attack. There are four parts I will cover, and this tutorial covers part one.
![rpg maker xp 3d script rpg maker xp 3d script](https://i.ytimg.com/vi/wkXgas-9J_k/maxresdefault.jpg)
This is going to go into how to make a real-time battle system, where your character encounters enemies that move and fight, while you move around, avoiding attacks and fighting back. it feels odd being the first to write an RMXP tutorial, but here it goes.