Gw Temp

Menu

Tutorial - 'Sprinting' by Guest

An item about RPGMaker 2000 posted on

Blurb

How to make a hero sprint in rm2k

Body

Hello and welcome to my second tutorial! In this one I will teach you people how to make a hero sprint in rm2k.

1. GRAPHICS:-
First off we need a charset of the hero walking, and a charset of the hero running. Once that is done with we get to the coding!

2. CODING:-
Alright, now comes the harder part that requires knowledge of variables. This is only hard for first time users, though, and you don't need to be an advanced user to simply breeze through this!
Anyway enough talk, let's get on to the coding!
(NOTE: First make an event that disables the menu!)

Make a Common Event (found in the Database) and call it "Sprint" or something like that. Make sure it is Parrallel Process!
<>Enter Password: [0001:Running] (This may be activated by any key although I chose the esc. key)
<>FORK Optn: Varb[0001:Running]-6
<>Move Event... : Hero, Wait
<>Wait: 0.2s
<>Enter Password: [0001:Running]
<>FORK Optn: Varb[0001:Running]-6
<>Move Event... : Hero, Move Speed Up
<>Wait: 0.1s
<>Move Event... : Hero, Change Graphic (to the running graphic), Forward (Make sure you select "Ignored if can't be moved" or else the game freezes up!)
<>Enter Password: [0001:Running]
<>FORK Optn: Varb[0001:Running]-6
<>Move Event... : Hero, Wait
<>Wait: 0.1s
<>Move Event... : Hero, Move Speed Down, Change Graphic (to the normal graphic)
<>Variable Ch:[0001:Running]Set, 0
<>
:END Case
<>
:END Case
<>
:END Case
<>

And that's that!
You have just programmed the hero to run forwards when you press the esc key. To make him stop running, simply press the esc key again. You can incorporate this running coding into an ABS to make a running attack if you know how (see my first tut for simple ABS coding).

Well, that's all for now guys! See ya later!