Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Script for just Diagonal Movement

Is there a way to script it so that when your character moves , they move ONLY in diagonal position , because the fft characters i have move diagonaly no matter what and even with editing , the chip sets are set in a diagonal way so that if your cahracter moved up , it wouldnt work.


*PS* I am thinking i should not use FFT resources and instead use created resources that just look like the fft characters.
 
You could use this, but it looks strange without a pixel movement script. :P
Code:
class Game_Player < Game_Character
  
  alias old_update update
  
  def update
      unless moving? or $game_system.map_interpreter.running? or
           @move_route_forcing or $game_temp.message_window_showing
      # Move player in the direction the directional button is being pressed
      case Input.dir4
      when 2
        move_lower_right
      when 4
        move_lower_left
      when 6
        move_upper_right
      when 8
        move_upper_left
      end
    end
    old_update
  end
  
end

Just place it in a new script above main.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top