Charas-Project

Game Creation => Requests => RPG Maker Programming => Topic started by: Koopaboy on September 21, 2006, 12:32:23 PM

Title: 8 side movement
Post by: Koopaboy on September 21, 2006, 12:32:23 PM
Is it possible to make the hero move in 8 sides like in Zelda games?If yes,tell me how.
Title:
Post by: Black Massacre on September 21, 2006, 06:10:18 PM
Is this what your looking for?

http://www.gamingw.net/tutorials/156
Title:
Post by: Meiscool-2 on September 21, 2006, 07:17:31 PM
That's for game maker I think.

8 way movement requires a few important things, but it's easy enough.
Title:
Post by: Black Massacre on September 21, 2006, 07:37:50 PM
Quote
Originally posted by Meiscool
That's for game maker I think.


Woops! Nevermind, then.  :D
Title:
Post by: DragonBlaze on September 22, 2006, 03:01:24 AM
8-way movement is not possible in rm2k3. In rmxp, its pretty easy, you can just download a script for that.

Rm2k3 only recognizes one button at a time. If you press the up button, then press the left button, it'll only recognize the left button as being pushed. Even if you made two key input processes in two differant events with 2 differant varaibles, rm2k3 will only recognize one of  them. Thus, 8 way movement is not possible in rm2k3.

There are two ways that you could make a 8 way movement system, but they wouldn't be true 8 way movements. First, you make key input processes for the left and right keys. Instead of moving left or right, you would turn 45 degrees left or right. When you push the up button, you move forward or in the dirrection your facing, when you press down, you turn around or something. I think a movement system like that would be too confusing for a player to get down.

The other way to do it would only work for minigames or something. You would be in constant movement, when you press the left key, you turn left, when you press the right key, you turn right. Basically the same as the other way, just this way your contantly moving. If you wanted to make an arial combat mini game, this would be the way to go.
Title:
Post by: WarxePB on September 22, 2006, 11:13:55 AM
Actually, you can ghetto-rig 8-way movement by using two sets of Key Inputs/branches (for example, pressing Left, then checking what it equals, then pressing Up, then checking what it equals).
Title:
Post by: Shadowless1 on September 22, 2006, 05:40:34 PM
err he just said the way of doing that doesnt work, ive tried myself on rm2k3 1.09, it doesnt work
Title:
Post by: drenrin2120 on September 23, 2006, 01:17:44 AM
There is a way, I've seen it and played 8-way movement in rm2k/3.
Title:
Post by: EXO Muffin on September 23, 2006, 06:41:47 AM
omg numpd insted uv aroz lol
Title:
Post by: DragonBlaze on September 23, 2006, 01:34:33 PM
Quote
Originally posted by drenrin2120
There is a way, I've seen it and played 8-way movement in rm2k/3.


Are you sure it wasn't an rmxp game that looked like an rm2k3 game? The way the system is designed, its just not possible since rm2k3 will only recognize one dirrectional key at a time.

To test this out, make two seperate parallel process events. In each event, make a key input process, have one event check for  the up key, and one for the left key, have one event check for the down key. Store the results in two differant  variables. Below the key input processes, make a fork condition (with an else case). Fork if the above key is pressed. In the fork condition, display a picture. Have one with picture ID of 1, have one with picture ID of 2. Display them at differant parts of the screen. Put a wait .01 seconds after the display picture. In the else case, put an erase picture event that erases the picture displayed above.

You will notice when you run this, that only one picture will be displayed at a time even if you press both keys. The system just won't recognize both keys being pressed at the same time. No matter where you put the key input processes or forks or whatever, the results will still be the same.

IF you get both pictures displayed on the screen, tell me which version you have of rm2k3 so I can make myself an 8 way movment script out of it :)
Title:
Post by: EXO Muffin on September 23, 2006, 07:48:03 PM
Quote
Originally posted by EXO Muffin
AHEM. I just said that if you use the numpad for movement, you only need one key to move.

EXAMPLE:

Numpad:

7|8|9|
4|5|6|
1|2|3|

=

`. |  /
-  o -
/  | `.  

=

NW.N.NE
W...x....E
SW.S..SE
Title:
Post by: I Have a Sandwich on September 23, 2006, 07:50:57 PM
No, you said "omg numpd insted uv aroz lol".
Title:
Post by: Meiscool-2 on September 23, 2006, 09:36:09 PM
8 way movement IS possible. I've done it.

However, the key thing in making it is you CAN'T use the hero as your moved character. For example, in my battles in Metal Tears, I use an event as my "hero" instead of using the actual hero. Doing this, I can enable eight way movement for the EVENT, but not for the HERO.
Title:
Post by: Ruler of the Dark on September 23, 2006, 09:44:27 PM
I laugh at you all.
It is possible to implement 8-way movement for the hero.

Here's what I did.
I made 3 common events.  The first one checked for if LEFT or RIGHT were pressed.  If LEFT was pressed it would turn the switch "left", if it wasn't, it would turn it off.  The same with RIGHT.
The second common event was the same as the first, but it was for UP and DOWN.

Finally, a common event was made to move the hero.  If LEFT and UP were on, the hero would move up-left (ignoring impossible movement) and then the script would jump to LABEL 1.  If LEFT and DOWN were on, the hero would move down-left (also ignoring impossible movement) and also jumping to LABEL 1.  I repeated this for the other two movements, and put LABEL 1 at the end of the code.

In the end, the Hero would move a bit THEN move diagonally, but it worked.
Title:
Post by: DragonBlaze on September 24, 2006, 03:25:26 AM
Huh... Well, I guess 8 way movement is easy.

I just tried this and it worked with the actual hero.

I made 3 parallel process events. One checked if up or down was pushed, one checked if left or right was pushed.

If up or down was pushed, it set a variable (y movement) equal to 1 or 4, if neither was pushed, it was set to 0.

If left or right was pused, it set a variable (x movement) equal to 2 or 3, if neither was pushed, it was set to 0.

The third common event was like this.

If y movement = 1
If x movement = 2
move hero up/left
end
end

if y movmement = 4
If x movement = 3
move hero down/right
end
end

if y movement = 0
if x movement = 2
move hero left
end
end

I made one of those for each dirrection, and it worked perfectly.
Title:
Post by: Meiscool-2 on September 24, 2006, 02:19:42 PM
Those can't work prefectly though... can they?
Title:
Post by: DragonBlaze on September 24, 2006, 03:37:28 PM
Quote
Originally posted by Meiscool
Those can't work prefectly though... can they?


As far as I can tell they can...

I love it when I'm wrong on things like 8-way movement.
Title:
Post by: drenrin2120 on September 24, 2006, 05:16:32 PM
Quote
Originally posted by DragonBlaze
quote:
Originally posted by Meiscool
Those can't work prefectly though... can they?


As far as I can tell they can...

I love it when I'm wrong on things like 8-way movement.


lol, oh the irony.
Title:
Post by: young link on October 15, 2006, 10:25:19 PM
I'm back comunity!

Hey dragonblaze... I tried to make sence of your code and couldnt... could maybe make it a bit more understandable? I was going to make a post about this... but then i saw this one...
Title:
Post by: Archem on October 15, 2006, 10:44:24 PM
You're back... From where? And was it really worth a topic kick? PMs DO work, you know.