Up + Down Movement

Hey guys, I been messing around with the default directions in the script, however I cannot figure out how to disable
the following (Facing Down) Sprites, and the (Facing Up) Sprites.

My game uses only left and right sprites while still able to move up and down.

Basically my movement needs to be like "Dungeon Fighter Online"

Example of moving Left,Right,Up, and Down.







If the character is facing left, and I move up, then I want the character to still be facing left while moving up, if I turn right while moving up I'll still be facing right.
I hope that is enough details on what I need.

Thanks.
If you want this to apply ONLY to the player, add this in a new script slot:

class Game_Player < Game_Character def set_direction(d) super(d) if [4,6].include?(d) endendBut if you want it to apply to ALL characters (player, followers, events, vehicles), add this instead in a new script slot:

Code:
class Game_CharacterBase  alias shaz_sidedir_set_direction set_direction  def set_direction(d)    shaz_sidedir_set_direction(d) if [4,6].include?(d)  endend
Thanks this is perfect, I don't think I need it for anything else but the Player.


But in case I do, is there a way to use them for only certain stuff?

Example: Maybe use the [4,6] directions for Player, and Events, but not Airship/etc?
If you want it for player AND events, but not for vehicles or followers, use this:

Code:
class Game_Player < Game_Character  def set_direction(d)    super(d) if [4,6].include?(d)  endendclass Game_Event < Game_Character  def set_direction(d)    super(d) if [4,6].include?(d)  endend
Alright, everything works absolutely perfect.
Thanks Shaz.

You can close this.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/up-down-movement.19143/