Gw Temp

Menu

Tutorial - 'Touchsystem' by Axel

An item about RPGMaker 2000 posted on

Blurb

A tutorial explaining how to do this system called 'touchsystem'. Read more to find out.

Body

This tutorial will explain you how to make a “touchsystem”. First I should explain what that means to be. It’s a system of course, and you can use it in custom battles. You can make you can hit monster with it and monster can hit you. This is the very basis of it, you can make the battle on your own of course I suppose.

You need
· rm2k or rm2k3
· at least 2 variables and for every monster you use this for 2 extra variables
· for this basis no switches but for the battle I suppose you need some
· … to know how variables, input key, coordinates and fork conditionings work

Index
Step 1 Telling the event commands
Step 2 Put in the event commands

STEP 1 Telling the event commands
Well we will make the first event commands. You probably already read we will use coordinates so first we should set the heroes coordinates in variables.
V[0001: X position hero] and V[0002: Y position hero]
Of course the monster we will use this for needs also his coordinates in variables.
V[0003: X position monster 1] and V[0003: Y position monster 1]
Then we must check if the hero stands next to the monster (or the monster next to the hero) and faces it. When the hero stands one square above the monster (so if the heroes Y position is just 1 less than the monsters) and the hero faces down and the heroes X position is the same as the X position of the monster, the hero can attack.
When the hero stands one square down the monster (so if the heroes Y position is just 1 more than the monsters) and the hero faces up and the heroes X position is the same as the X position of the monster, the hero can attack.
If the heroes X position is one more than the monsters, the hero faces left and the Y position is the same, the hero can attack.
You can probably make up yourself how it should be when the hero stands left.

STEP 2 Put in the event commands
So now we will put in the event commands. I will just type them here. If you do not understand anything, it’s explained in step one.

THE EVENT COMMANDS
<>Variable: V[0001: X position hero] Set, Hero, X coord.
<>Variable: V[0002: Y position hero] Set, Hero, Y coord.
<>Variable: V[0003: X position monster 1] Set, Monster 1, X coord.
<>Variable: V[0004: Y position monster 1] Set, Monster 1, Y coord.
<>If: V[0001: X position hero], V[0003] (=)
…<>V[0002: Y position hero] +, 1
…<>If: V[0002: Y position hero], V[0004] (=)
……<>If: Hero, Down
………<>Hero is 1 square above the monster and faces down
……
………<>Hero is 1 square above the monster but doesn’t face down
……
……<>

……<>Variable: V[0002: Y position hero] –, 2
……<>If: V[0002: Y position hero], V[0004] (=)
………<>If: Hero, Up
…………<>Hero stands down the monster and faces up
………
…………<>Hero stands down the monster but doesn’t face up
………
………<>
……
………<>Hero doesn’t stand next to the monster
……
……<>

…<>

…<>If: V[0002: Y position hero], V[0004] (=)
……<>Variable: V[0001: X position hero] +, 1
……<>If: V[0001: X position hero], V[0003] (=)
………<>If: Hero, Right
…………<>Hero stands left the monster and faces right
………
…………<>Hero stands left the monster but doesn’t face right
………
………<>
……
………<>Variable: V[0001: X position hero] –, 2
………<>If: V[0001: X position hero], V[0003] (=)
…………<>If: Hero, Left
……………<>Hero stands right the monster and faces left
…………
……………<>Hero stands right the monster but doesn’t face left
…………
…………<>
………
…………<>Hero doesn’t stand next to the monster
………
………<>
……
……<>

……<>Hero doesn’t stand next to the monster

…<>

<>

And that’s it! Easy, wasn’t it… Anyway, if you have have any critic or suggestions, let me know! On to the next tutorial!

Axel