Move only Left and Right

Hello all -

I've recently begun delving into the scripting system for VX ACE. I've learned the basics, but there's a lot I can't seem to figure out on my own. This is my first time posting on an official forum for help, so I will do my best to convey my issue:

My goal here is to restrict player movement to only the left and right - but not just for one instance, for the entirety of the game. I am not looking to make a platformer game, but rather, something similar to "Dreaming Mary" (if only in terms of movement). It was developed in Rpgmaker, so I know it must be entirely possible.

Here is a youtube video showing the movement in the game:







I have attempted to use a script called "Restricted Move Inputs" by Hime: http://himeworks.com/2013/09/restricted-move-inputs/ , but the problem is that when I script call using an autorun event to disable the up and down movements, it disables all character movement. It ONLY works when I set the event to be triggered by player touch. (Meaning the player could move in any direction, then once they touch the event, they can only move left and right).

I have no other scripts in my project. Anyone have a solution? Thanks for all the help in advance.

EDIT: The youtube video shows that when the player presses the up and down arrow keys, the sprite still changes despite no movement being made. This is not a goal I had, but if it is commonly known how to make this happen, then by all means, go ahead and post it!
Find this in your Game_Player script (mine is online 277):

Code:
  #--------------------------------------------------------------------------  # * Processing of Movement via Input from Directional Buttons  #--------------------------------------------------------------------------  def move_by_input    return if !movable? || $game_map.interpreter.running?    move_straight(Input.dir4) if Input.dir4 > 0  end
Change that move_straight line to this:
Code:
move_straight(Input.dir4) if [4,6].include?(Input.dir4)
Not sure why I didn't think of this, hah. Such simple logic behind it.

Anyway, thank you very much!

Original thread: https://forums.rpgmakerweb.com/threads/move-only-left-and-right.50541/