加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员  
 
x
 
 本帖最后由 吉吉阿茶 于 2018-8-24 20:04 编辑  
 
 
 
 
 
如图,游戏里的画面放大了200%,那个上层元件框起来的位置就代表着游戏画面实际上显示的范围, 
但是地图大小实际上是有限制的,并不能做出这么小的地图,按照镜头默认玩家在最中间的话玩家走在小房间的边缘感觉就不是很好看了 
所以想问一下,有没有什么脚本能固定视角移动的呢?譬如说xx号开关打开,视角不跟随主角移动什么的   
 
另外视角上这里还有用一个弹性滚动地图的脚本 
#============================================================================== # ■ 弹性滚动地图 V 1.00 BY SLICK #------------------------------------------------------------------------------ #  处理主角的类。事件启动的判定、以及地图的滚动等功能。 # 本类的实例请参考 $game_player。 # 我:。。。这个黄金版已经被改的面目全非了 #============================================================================== class Game_Player < Game_Character     MOVESPEA = 0.70   OFF_SW = 1  # 打开这个开关就停用弹性滚动     alias sny46_160817_update_scroll update_scroll   def update_scroll(last_real_x, last_real_y)     if $game_switches[OFF_SW]       return sny46_160817_update_scroll(last_real_x, last_real_y)     end     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)     movespeb = (2 ** (@move_speed+1))*MOVESPEA     movesped = movespeb / Graphics.width     movespec = movespeb / Graphics.height     tmp=center_x-ax2     $game_map.scroll_left(movesped*tmp) if tmp>0     $game_map.scroll_right(-movesped*tmp) if tmp<0     tmp=center_y-ay2     $game_map.scroll_up(movespec*tmp) if tmp>0     $game_map.scroll_down(-movespec*tmp) if tmp<0       end   end 
 
 #==============================================================================  
# ■ 弹性滚动地图 V 1.00 BY SLICK  
#------------------------------------------------------------------------------  
#  处理主角的类。事件启动的判定、以及地图的滚动等功能。  
# 本类的实例请参考 $game_player。  
# 我:。。。这个黄金版已经被改的面目全非了  
#==============================================================================  
class Game_Player < Game_Character  
   
  MOVESPEA = 0.70  
  OFF_SW = 1  # 打开这个开关就停用弹性滚动  
   
  alias sny46_160817_update_scroll update_scroll  
  def update_scroll(last_real_x, last_real_y)  
    if $game_switches[OFF_SW]  
      return sny46_160817_update_scroll(last_real_x, last_real_y)  
    end  
    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)  
    movespeb = (2 ** (@move_speed+1))*MOVESPEA  
    movesped = movespeb / Graphics.width  
    movespec = movespeb / Graphics.height  
    tmp=center_x-ax2  
    $game_map.scroll_left(movesped*tmp) if tmp>0  
    $game_map.scroll_right(-movesped*tmp) if tmp<0  
    tmp=center_y-ay2  
    $game_map.scroll_up(movespec*tmp) if tmp>0  
    $game_map.scroll_down(-movespec*tmp) if tmp<0      
  end    
end  
 
  |