Method to overriding movement controls?

● ARCHIVED · READ-ONLY
Started by boldpaste2 3 posts View original ↗
  1. Lets see how I can best explain this. xD I am trying to make a mini game where the map is scrolling and if the player falls off the map its game over. I got the whole scroll map and falling off the map part working.

    The problems lies in player movement however. I was wondering if there was a way (or script, preferably CC by 3.0) that allows me to override movement controls to a different action. For example.

    Default Movement

    Up : Up

    Left : Left

    Right : Right

    Down : Down

    Modified Controls

    Up : Up

    Left : Upper Left

    Right : Upper Right

    Down : UP

    Basically, with this control scheme the player will always be moving in a single direction but has control of going left or right to dodge incoming objects.

    A million thanks to someone who has an answer to this. ^^ 
  2. The method you'll want to change is "move_by_input" in the Game_Player class.  Here's a scriptlet that gives you exactly what you asked for:

    class Game_Player < Game_Character #-------------------------------------------------------------------------- # * Processing of Movement via Input from Directional Buttons #-------------------------------------------------------------------------- def move_by_input return if !movable? || $game_map.interpreter.running? case (Input.dir4) when 2,8 move_straight(8) when 4 move_diagonal(4,8) when 6 move_diagonal(6,8) end end endWith that being said, your current setup probably isn't too exciting because you're most likely not forcing the player to dodge incoming objects with any speed.  I was trying to figure out a way to really simulate speed in my IGMC contest entry timeblazer and I think I got it down pretty well by having obstacles and scenery loop from the top to bottom of the screen while restricting the player's movement to left and right.  It looks like you're running the whole way and it's very action-packed.  You can see it in practice in the first action sequence of the game, as well as two or three other action sequences in later stages.  Let me know if you like that approach and I can give you some more hints toward setting it up.
  3. I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.


    That would modify ALL movement in your game. If you only wanted to do that SOMETIMES you would have to use a switch or something to turn on the "special" movement, and then modify your move_by_input method to check the switch and either do the normal movement or the special movement based on its value.