#============================================================================== # ■ Map Scrolling Expansion # By :VIPArcher [email: VIPArcher@sina.com] # -- The script comes from http://rm.66rpg.com Please keep the information above. # Feel free to use/ reprint #============================================================================== # Description: # For the event, call start_scroll(direction, distance, speed) to scroll map # direction: 7 8 9 distance: scroll distance # ↖↑↗ speed: scroll speed 1 - 6 # 4← →6 1: 1/8x slow; 2: 1/4x slow # ↙↓↘ 3: 1/2x slow; 4: normal speed # 1 2 3 5: 2x fast; 6: 4x fast # If you move diagonally to edge, it will turn horizontally. #============================================================================== $VIPArcherScript ||= {};$VIPArcherScript[:map_scroll] = 20150503 #============================================================================== class Game_Interpreter #-------------------------------------------------------------------------- # ● start_scroll(direction, distance, speed) # direction scroll direction (1-9) # distance scroll distance (# of cells) # speed scroll speed (1-6) #-------------------------------------------------------------------------- def start_scroll(direction, distance, speed) Fiber.yield while $game_map.scrolling? $game_map.start_scroll(direction, distance, speed) end end #============================================================================== class Game_Map #-------------------------------------------------------------------------- # ● Start scrolling #-------------------------------------------------------------------------- alias do_scroll_dir8_extra do_scroll def do_scroll(direction, distance) do_scroll_dir8_extra(direction, distance) case direction when 1; scroll_down (distance);scroll_left (distance) when 3; scroll_down (distance);scroll_right(distance) when 7; scroll_up (distance);scroll_left (distance) when 9; scroll_up (distance);scroll_right(distance) else end end end