=begin
===============================================================================
地图卷动频率修改 By喵呜喵5
===============================================================================
【说明】
默认情况下,当地图的大小足够时,地图会强制进行卷动以保持玩家的位置永远在屏幕中心。
这个脚本修改了卷动的频率,当玩家处在画面中心的正方形区域时地图都不会自动卷动。
脚本兼容性极差,所以把脚本放在其他插件脚本之上吧。
使用这个脚本可能会产生各种奇怪的BUG,因此连我自己都不用这个脚本【喂!
=end
$m5script = {} if $m5script.nil?
$m5script["M5MapOrz"] = true
class Game_Player
def update_scroll(last_real_x, last_real_y)
#==============================================================================
# 设定部分
#==============================================================================
degree = 1
# 正方形区域的大小,数字越大区域越大
#==============================================================================
# 设定结束
#==============================================================================
ax1 = $game_map.adjust_x(last_real_x)
ay1 = $game_map.adjust_y(last_real_y)
ax2 = $game_map.adjust_x(@real_x)
ay2 = $game_map.adjust_y(@real_y)
$game_map.scroll_down (ay2 - ay1) if ay2 > ay1 && ay2 > center_y + degree
$game_map.scroll_left (ax1 - ax2) if ax2 < ax1 && ax2 < center_x - degree
$game_map.scroll_right(ax2 - ax1) if ax2 > ax1 && ax2 > center_x + degree
$game_map.scroll_up (ay1 - ay2) if ay2 < ay1 && ay2 < center_y - degree
end
end