# * The Other Way XP - Option 1 # Scripter : Kyonides-Arkanthos # Script Calls # For Long Lasting Effects # $game_player.other_way = some_boolean # Booleans: true - turns right if you pressed left, false or nil - normal # For Temporary Effects # $game_player.other_way_duration(seconds) class Game_Player attr_writer :other_way alias kyon_other_way_up update alias kyon_other_way_move_down move_down alias kyon_other_way_move_left move_left alias kyon_other_way_move_right move_right alias kyon_other_way_move_up move_up def initialize super @other_way_timer = 0 end def update if @other_way_timer > 0 @other_way_timer -= 1 @other_way = nil if @other_way_timer == 0 end kyon_other_way_up end def move_down(turn_enabled = true) if @other_way and !@wrong_way @wrong_way = true move_up(turn_enabled) return end @wrong_way = nil kyon_other_way_move_down(turn_enabled) end def move_left(turn_enabled = true) if @other_way and !@wrong_way @wrong_way = true move_right(turn_enabled) return end @wrong_way = nil kyon_other_way_move_left(turn_enabled) end def move_right(turn_enabled = true) if @other_way and !@wrong_way @wrong_way = true move_left(turn_enabled) return end @wrong_way = nil kyon_other_way_move_right(turn_enabled) end def move_up(turn_enabled = true) if @other_way and !@wrong_way @wrong_way = true move_down(turn_enabled) return end @wrong_way = nil kyon_other_way_move_up(turn_enabled) end def other_way_duration(seconds) @other_way = true @other_way_timer = seconds * Graphics.frame_rate end end