Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ~ Akian~RGSS3 ~
- # Nombre del script: AR3 ~ Diagonal Move
- # Scripter: Akian~RGSS3
- # Requiere?: -
- # Versión: 1.0
- # Permite el simple movimiento en diagonal en el mapa que por defecto RMVXA
- # no tiene
- $imported = {} if $imported.nil?
- $imported["AR3_Diagonal_Move"] = true
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # Game Character
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- class Game_Player < Game_Character
- #--------------------------------------------------------------------------
- # ▼ Proceso de movimiento por Input
- #--------------------------------------------------------------------------
- def move_by_input
- return if !movable? || $game_map.interpreter.running?
- case Input.dir8
- when 2,4,6,8
- move_straight(Input.dir4)
- when 1
- move_diagonal_ar(4, 2)
- when 3
- move_diagonal_ar(6, 2)
- when 7
- move_diagonal_ar(4, 8)
- when 9
- move_diagonal_ar(6, 8)
- end
- end
- #--------------------------------------------------------------------------
- # ▼ Nuevo metodo de movimiento en diagonal
- #--------------------------------------------------------------------------
- def move_diagonal_ar(x, y)
- move_diagonal(x, y)
- return if moving?
- move_straight(x)
- move_straight(y)
- end
- end
- #===============================================================================
- #
- # ▼ Fin del mundo, acá se acaba todo
- # ~ Akián RGSS3 ~
- #===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement