| 赞 | 0  | 
 
| VIP | 13 | 
 
| 好人卡 | 72 | 
 
| 积分 | 4 | 
 
| 经验 | 30749 | 
 
| 最后登录 | 2022-6-21 | 
 
| 在线时间 | 1036 小时 | 
 
 
 
 
 
Lv2.观梦者 
	- 梦石
 - 0 
 
        - 星屑
 - 354 
 
        - 在线时间
 - 1036 小时
 
        - 注册时间
 - 2011-5-19
 
        - 帖子
 - 2098
 
 
 
 | 
	
 本帖最后由 MSQ 于 2011-7-27 11:58 编辑  
 
发个脚本。 
试着用用- #==============================================================================
 
 - # ■ 华丽镜头移动脚本  by 黑暗之神Kaiser.DS
 
 - #------------------------------------------------------------------------------
 
 - #  1-插入此段脚本到Main前面
 
 - #   2-功能
 
 - #     a-[镜头平滑移动到事件/角色]
 
 - #       在事件里的[设置移动路线]里选择需要镜头转向的角色输入脚本kds即可
 
 - #     b-[镜头跟随事件]
 
 - #       在事件里的[设置移动路线]选择好需要跟随的事件后输入脚本kds_move_start开
 
 - #       始跟随,当不想跟随时再输入kds_move_over
 
 - #==============================================================================
 
 - class Game_Map
 
 -   attr_accessor   :display_x                # 显示 X 坐标 * 256
 
 -   attr_accessor   :display_y                # 显示 Y 坐标 * 256
 
 - end
 
 - $平滑移动 = nil
 
 - class Scene_Map
 
 -   alias kds_update update
 
 -   def update
 
 -     kds_update
 
 -     if $平滑移动 != nil
 
 -       cen_x = Game_Character::CENTER_X
 
 -       cen_y = Game_Character::CENTER_Y
 
 -       max_x = ($game_map.width - 17) * 256
 
 -       max_y = ($game_map.height - 13) * 256
 
 -       display_x = [0, [$平滑移动.x * 256 - cen_x, max_x].min].max
 
 -       display_y = [0, [$平滑移动.y * 256 - cen_y, max_y].min].max
 
 -       if $game_map.display_x != display_x
 
 -          if ($game_map.display_x - display_x).abs < 22
 
 -            $game_map.display_x = display_x
 
 -          else
 
 -            $game_map.display_x += (display_x - $平滑移动.old_display_x)/32
 
 -          end
 
 -       end
 
 -       if $game_map.display_y != display_y
 
 -          if ($game_map.display_y - display_y).abs <= 22
 
 -             $game_map.display_y = display_y
 
 -          else
 
 -             $game_map.display_y += (display_y - $平滑移动.old_display_y)/32
 
 -          end
 
 -       end
 
 -       if $game_map.display_x == display_x  and $game_map.display_y == display_y
 
 -          $平滑移动.center($平滑移动.x, $平滑移动.y)
 
 -          $平滑移动 = nil
 
 -       end
 
 -       return
 
 -     end
 
 -   end  
 
 - end
 
 - class Game_Character
 
 -   CENTER_X = (544 / 2 - 16) * 8     # 画面中央的 X 坐标 * 8
 
 -   CENTER_Y = (416 / 2 - 16) * 8     # 画面中央的 Y 坐标 * 8
 
 -   attr_accessor :old_display_x
 
 -   attr_accessor :old_display_y
 
 -   attr_accessor :kds_move
 
 -   def center(x, y)
 
 -     max_x = ($game_map.width - 17) * 256
 
 -     max_y = ($game_map.height - 13) * 256
 
 -     $game_map.display_x = [0, [x * 256 - CENTER_X, max_x].min].max
 
 -     $game_map.display_y = [0, [y * 256 - CENTER_Y, max_y].min].max
 
 -   end
 
 -   def kds
 
 -     @old_display_x = $game_map.display_x
 
 -     @old_display_y = $game_map.display_y
 
 -     case @id
 
 -     when 0
 
 -       $平滑移动 = $game_player
 
 -     else
 
 -       $平滑移动 = $game_map.events[@id]
 
 -     end
 
 -   end
 
 -   def kds_move_start
 
 -       @kds_move = ""
 
 -   end
 
 -   def kds_move_over
 
 -       @kds_move = nil
 
 -   end
 
 -   alias kds_update update
 
 -   def update
 
 -     last_real_x = @real_x
 
 -     last_real_y = @real_y
 
 -     kds_update
 
 -     if @kds_move != nil
 
 -      if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y
 
 -        $game_map.scroll_down(@real_y - last_real_y)
 
 -      end
 
 -      if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X
 
 -        $game_map.scroll_left(last_real_x - @real_x)
 
 -      end
 
 -      if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X
 
 -       $game_map.scroll_right(@real_x - last_real_x)
 
 -      end
 
 -      if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y
 
 -        $game_map.scroll_up(last_real_y - @real_y)
 
 -      end
 
 -     end
 
 -   end  
 
 - end
 
 - #==============================================================================
 
  复制代码 |   
 
 
 
 |