设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 4001|回复: 9
打印 上一主题 下一主题

第二版 月光传说4(冒险岛)宠部分资料(视频)

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
9 小时
注册时间
2006-4-26
帖子
444
跳转到指定楼层
1
发表于 2008-3-10 02:43:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
宠物系统终于给饿做出来了!================================
凉快一哈=================={/cy}{/cy}


这里是自己做的视频(第一次,请见谅)
地址http://www.tudou.com/programs/view/10uqLVIEIFw/


宠物的基本操作
Q跟随/固定
W攻击
E切换攻击动作

意思就是说,按一次Q后,会从跟随变成固定,就像视频中的一样,BB就站那不动了.再按一次就自己跑过来了...
主角与BB的Y坐标不一致时,BB会自动瞬间移动到主角身边的
按一次W呢就会执行攻击动作了.
当然.BB打了怪,怪就会追BB而不追你了..


带BB的测试版本在下个星期18日放出(wrong!)
第一章将在最近几个星期放出!

更多的系统请期待一一揭晓-0-
游戏的正式版在暑假应该能出了(在暑假才开始做-0-)

游戏的其他资料
http://rpg.blue/viewthread.php?tid=78696&ntime=2008%2D3%2D9+18%3A02%3A00
测试版的下载地址(bug 多)
http://rpg.blue/viewthread.php?tid=73273&ntime=2008%2D3%2D9+18%3A02%3A00
群:13283861

Lv1.梦旅人

传奇

梦石
0
星屑
50
在线时间
4 小时
注册时间
2007-4-10
帖子
427
2
发表于 2008-3-10 03:02:30 | 只看该作者
很期待  LZ的正式版
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
9 小时
注册时间
2006-4-26
帖子
444
3
 楼主| 发表于 2008-3-15 19:26:25 | 只看该作者
MS  66现在的人的气息越来越稀薄了-0-
群:13283861
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
2 小时
注册时间
2007-8-13
帖子
11
4
发表于 2008-3-16 01:52:50 | 只看该作者
希望 带BB的测试版本 能够解密  我们新来的研究研究
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
9 小时
注册时间
2006-4-26
帖子
444
5
 楼主| 发表于 2008-3-16 02:38:13 | 只看该作者
那个......
带BB的测试版本....
我准备直接放出第一章........
正在准备第一章......
群:13283861
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
20
在线时间
1 小时
注册时间
2008-2-28
帖子
1
6
发表于 2008-3-16 04:32:36 | 只看该作者
额我下也下不到{/dk}{/dk}{/dk}{/dk}{/dk}
[RM=490,350][/RM]
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
2 小时
注册时间
2007-8-13
帖子
11
7
发表于 2008-3-16 21:14:50 | 只看该作者
看了录象  真的好佩服你  可是也有许多美中不足的地方  像跳跃时屏幕一震一震的 我推荐个脚本
  1. #==============================================================================
  2. # ** Smooth_Scrolling
  3. #------------------------------------------------------------------------------
  4. #  Script by Toby Zerner
  5. #  Gives scrolling a 'smooth' effect (deceleration).
  6. #==============================================================================

  7. class Game_Map
  8.   attr_accessor :deceleration_start
  9.   attr_accessor :deceleration_speed
  10.   #--------------------------------------------------------------------------
  11.   # * Setup
  12.   #     map_id : map ID
  13.   #--------------------------------------------------------------------------
  14.   alias ss_setup setup
  15.   def setup(map_id)
  16.    
  17.     # -- CONFIGURATION VARIABLES
  18.     # When to start decelerating (bigger numbers mean ealier on) [default: 4]
  19.     @deceleration_start = 13
  20.     # How fast to decelerate (bigger numbers mean quicker) [default: 4]
  21.     @deceleration_speed = 13
  22.     # -- END CONFIGURATION VARIABLES
  23.    
  24.     # Call the old setup method
  25.     ss_setup(map_id)
  26.     # Initialize smooth scrolling variables
  27.     # scroll_remain: the number of pixels * 4 the still need to be scrolled
  28.     @scroll_remain_x = 0
  29.     @scroll_remain_y = 0
  30.     # scroll_take: the number of pixels * 4 that are being scrolled every frame
  31.     #   i.e. scrolling speed
  32.     @scroll_take_x = 0
  33.     @scroll_take_y = 0
  34.     # scroll_decel: variables for calculating decelaration
  35.     @scroll_decel_x = 0
  36.     @scroll_decel_y = 0
  37.   end
  38.   #--------------------------------------------------------------------------
  39.   # * Scroll Down
  40.   #     distance : scroll distance
  41.   #--------------------------------------------------------------------------
  42.   def scroll_down(distance)
  43.     # Ceil the distance
  44.     distance = distance.ceil
  45.     # If the map is scrolling from an event command, then use that scroll speed
  46.     if scrolling? then @scroll_take_y = 2 ** @scroll_speed
  47.     # If the map is not scrolling
  48.     else
  49.       # Make sure the distance is always divisible by 4
  50.       if distance.ceil % 4 == 0 then @scroll_take_y = distance.ceil
  51.       elsif distance.ceil % 4 <= 2 then @scroll_take_y = distance.ceil - distance.ceil % 4
  52.       else @scroll_take_y = distance.ceil + (4 - (distance.ceil % 4)) end
  53.     end
  54.     # If scrolling coordinates are inside the map's boundaries
  55.     unless @display_y + @scroll_remain_y + distance > (self.height - 20) * 128
  56.       # Add onto the amount left to be scrolled
  57.       @scroll_remain_y += distance
  58.     end
  59.   end
  60.   #--------------------------------------------------------------------------
  61.   # * Scroll Left
  62.   #     distance : scroll distance
  63.   #--------------------------------------------------------------------------
  64.   def scroll_left(distance)
  65.     # Ceil the distance
  66.     distance = distance.ceil
  67.     # If the map is scrolling from an event command, then use that scroll speed
  68.     if scrolling? then @scroll_take_x = 2 ** @scroll_speed
  69.     # If the map is not scrolling
  70.     else
  71.       # Make sure the distance is always divisible by 4
  72.       if distance.ceil % 4 == 0 then @scroll_take_x = distance.ceil
  73.       elsif distance.ceil % 4 <= 2 then @scroll_take_x = distance.ceil - distance.ceil % 4
  74.       else @scroll_take_x = distance.ceil + (4 - (distance.ceil % 4)) end
  75.     end
  76.     # If scrolling coordinates are inside the map's boundaries
  77.     unless @display_x - @scroll_remain_x - distance < 0
  78.       # Add onto the amount left to be scrolled
  79.       @scroll_remain_x -= distance
  80.     end
  81.   end
  82.   #--------------------------------------------------------------------------
  83.   # * Scroll Right
  84.   #     distance : scroll distance
  85.   #--------------------------------------------------------------------------
  86.   def scroll_right(distance)
  87.     # Ceil the distance
  88.     distance = distance.ceil
  89.     # If the map is scrolling from an event command, then use that scroll speed
  90.     if scrolling? then @scroll_take_x = 2 ** @scroll_speed
  91.     # If the map is not scrolling
  92.     else
  93.       # Make sure the distance is always divisible by 4
  94.       if distance.ceil % 4 == 0 then @scroll_take_x = distance.ceil
  95.       elsif distance.ceil % 4 <= 2 then @scroll_take_x = distance.ceil - distance.ceil % 4
  96.       else @scroll_take_x = distance.ceil + (4 - (distance.ceil % 4)) end
  97.     end
  98.     # If scrolling coordinates are inside the map's boundaries
  99.     unless @display_x + @scroll_remain_x + distance > (self.width - 20) * 128
  100.       # Add onto the amount left to be scrolled
  101.       @scroll_remain_x += distance
  102.     end
  103.   end
  104.   #--------------------------------------------------------------------------
  105.   # * Scroll Up
  106.   #     distance : scroll distance
  107.   #--------------------------------------------------------------------------
  108.   def scroll_up(distance)
  109.     # Ceil the distance
  110.     distance = distance.ceil
  111.     # If the map is scrolling from an event command, then use that scroll speed
  112.     if scrolling? then @scroll_take_y = 2 ** @scroll_speed
  113.     # If the map is not scrolling
  114.     else
  115.       # Make sure the distance is always divisible by 4
  116.       if distance.ceil % 4 == 0 then @scroll_take_y = distance.ceil
  117.       elsif distance.ceil % 4 <= 2 then @scroll_take_y = distance.ceil - distance.ceil % 4
  118.       else @scroll_take_y = distance.ceil + (4 - (distance.ceil % 4)) end
  119.     end
  120.     # If scrolling coordinates are inside the map's boundaries
  121.     unless @display_y - @scroll_remain_y - distance < 0
  122.       # Add onto the amount left to be scrolled
  123.       @scroll_remain_y -= distance
  124.     end
  125.   end
  126.   #--------------------------------------------------------------------------
  127.   # * Start Scroll
  128.   #     direction : scroll direction
  129.   #     distance  : scroll distance
  130.   #     speed     : scroll speed
  131.   #--------------------------------------------------------------------------
  132.   def start_scroll(direction, distance, speed)
  133.     # Set scrolling variables
  134.     distance          = distance.ceil * 128
  135.     @scroll_direction = direction
  136.     @scroll_speed     = speed
  137.     @scroll_rest      = distance
  138.     # Execute scrolling
  139.     case @scroll_direction
  140.     when 2  # Down
  141.       scroll_down(@scroll_rest)
  142.     when 4  # Left
  143.       scroll_left(@scroll_rest)
  144.     when 6  # Right
  145.       scroll_right(@scroll_rest)
  146.     when 8  # Up
  147.       scroll_up(@scroll_rest)
  148.     end
  149.   end
  150.   #--------------------------------------------------------------------------
  151.   # * Frame Update
  152.   #--------------------------------------------------------------------------
  153.   # This method could not be aliased because the scrolling part of the old
  154.   # method has been rewritten.
  155.   #--------------------------------------------------------------------------
  156.   def update
  157.     # Refresh map if necessary
  158.     if $game_map.need_refresh
  159.       refresh
  160.     end
  161.    
  162.     #--------------------------------------------------------
  163.     # If the map is still scrolling
  164.     if @scroll_rest > 0 then @scroll_rest -= 2 ** @scroll_speed end
  165.    
  166.     # If the x axis needs to be scrolled to the right
  167.     if @scroll_remain_x > 0
  168.       # If the amount to be scrolled is close enough to 0 to decelerate
  169.       if @scroll_remain_x <= @scroll_take_x * @deceleration_start
  170.         old_display_x = @display_x
  171.         # Add onto the deceleration variable
  172.         @scroll_decel_x += @deceleration_speed
  173.         # Work out how much to scroll
  174.         distance = [@scroll_take_x - @scroll_decel_x, 4].max
  175.         # If the scrolling coordinates are within the map's boundaries
  176.         unless @display_x + distance > (self.width - 20) * 128
  177.           @display_x += distance
  178.         end
  179.         # Subtract the amount that was scrolled
  180.         @scroll_remain_x += old_display_x - @display_x
  181.         if @scroll_remain_x < 0 then @scroll_remain_x = 0 end
  182.       # Otherwise, scroll at a normal speed
  183.       else
  184.         # Reset the deceleration variable
  185.         @scroll_decel_x = 0
  186.         # If the scrolling coordinates are out of range
  187.         if @display_x + @scroll_take_x > (self.width - 20) * 128
  188.           @display_x = (self.width - 20) * 128
  189.           @scroll_remain_x = 0
  190.         # Otherwise, scroll normally
  191.         else
  192.           @display_x += @scroll_take_x
  193.           @scroll_remain_x -= @scroll_take_x
  194.         end
  195.       end
  196.       
  197.     # If the x axis needs to be scrolled to the left
  198.     elsif @scroll_remain_x < 0
  199.       # If the amount to be scrolled is close enough to 0 to decelerate
  200.       if @scroll_remain_x >= -@scroll_take_x * @deceleration_start
  201.         old_display_x = @display_x
  202.         # Add onto the deceleration variable
  203.         @scroll_decel_x += @deceleration_speed
  204.         # Work out how much to scroll
  205.         distance = [@scroll_take_x - @scroll_decel_x, 4].max
  206.         # If the scrolling coordinates are within the map's boundaries
  207.         unless @display_x - distance < 0
  208.           @display_x -= distance
  209.         end
  210.         # Subtract the amount that was scrolled
  211.         @scroll_remain_x += old_display_x - @display_x
  212.         if @scroll_remain_x > 0 then @scroll_remain_x = 0 end
  213.       # Otherwise, scroll at a normal speed
  214.       else
  215.         # Reset the deceleration variable
  216.         @scroll_decel_x = 0
  217.         # If the scrolling coordinates are out of range
  218.         if @display_x - @scroll_take_x < 0
  219.           @display_x = 0
  220.           @scroll_remain_x = 0
  221.         # Otherwise, scroll normally
  222.         else
  223.           @display_x -= @scroll_take_x
  224.           @scroll_remain_x += @scroll_take_x
  225.         end
  226.       end
  227.    
  228.     # If no x scrolling needs to be done, reset the deceleration variable
  229.     else @scroll_decel_x = 0 end
  230.    
  231.     # If the y axis needs to be scrolled downwards
  232.     if @scroll_remain_y > 0
  233.       # If the amount to be scrolled is close enough to 0 to decelerate
  234.       if @scroll_remain_y <= @scroll_take_y * @deceleration_start
  235.         old_display_y = @display_y
  236.         # Add onto the deceleration variable
  237.         @scroll_decel_y += @deceleration_speed
  238.         # Work out how much to scroll
  239.         distance = [@scroll_take_y - @scroll_decel_y, 4].max
  240.         # If the scrolling coordinates are within the map's boundaries
  241.         unless @display_y + distance > (self.height - 15) * 128
  242.           @display_y += distance
  243.         end
  244.         # Subtract the amount that was scrolled
  245.         @scroll_remain_y += old_display_y - @display_y
  246.         if @scroll_remain_y < 0 then @scroll_remain_y = 0 end
  247.       # Otherwise, scroll at a normal speed
  248.       else
  249.         # Reset the deceleration variable
  250.         @scroll_speed_accel_y = 0
  251.         # If the scrolling coordinates are out of range
  252.         if @display_y + @scroll_take_y > (self.height - 15) * 128
  253.           @display_y = (self.height - 15) * 128
  254.           @scroll_remain_y = 0
  255.         # Otherwise, scroll normally
  256.         else
  257.           @display_y += @scroll_take_y
  258.           @scroll_remain_y -= @scroll_take_y
  259.         end
  260.       end
  261.    
  262.     # If the y axis needs to be scrolled downwards
  263.     elsif @scroll_remain_y < 0
  264.       # If the amount to be scrolled is close enough to 0 to decelerate
  265.       if @scroll_remain_y >= -@scroll_take_y * @deceleration_start
  266.         old_display_y = @display_y
  267.         # Add onto the deceleration variable
  268.         @scroll_decel_y += @deceleration_speed
  269.         # Work out how much to scroll
  270.         distance = [@scroll_take_y - @scroll_decel_y, 4].max
  271.         # If the scrolling coordinates are within the map's boundaries
  272.         unless @display_y - distance < 0
  273.           @display_y -= distance
  274.         end
  275.         # Subtract the amount that was scrolled
  276.         @scroll_remain_y += old_display_y - @display_y
  277.         if @scroll_remain_y > 0 then @scroll_remain_y = 0 end
  278.       # Otherwise, scroll at a normal speed
  279.       else
  280.         # Reset the deceleration variable
  281.         @scroll_speed_accel_y = 0
  282.         # If the scrolling coordinates are out of range
  283.         if @display_y - @scroll_take_y < 0
  284.           @display_y = 0
  285.           @scroll_remain_y = 0
  286.         # Otherwise, scroll normally
  287.         else
  288.           @display_y -= @scroll_take_y
  289.           @scroll_remain_y += @scroll_take_y
  290.         end
  291.       end
  292.    
  293.     # If no y scrolling needs to be done, reset the deceleration variable
  294.     else @scroll_decel_y = 0 end
  295.     #--------------------------------------------------------
  296.    
  297.     # Update map event
  298.     for event in @events.values
  299.       event.update
  300.     end
  301.     # Update common event
  302.     for common_event in @common_events.values
  303.       common_event.update
  304.     end
  305.     # Manage fog scrolling
  306.     @fog_ox -= @fog_sx / 8.0
  307.     @fog_oy -= @fog_sy / 8.0
  308.     # Manage change in fog color tone
  309.     if @fog_tone_duration >= 1
  310.       d = @fog_tone_duration
  311.       target = @fog_tone_target
  312.       @fog_tone.red = (@fog_tone.red * (d - 1) + target.red) / d
  313.       @fog_tone.green = (@fog_tone.green * (d - 1) + target.green) / d
  314.       @fog_tone.blue = (@fog_tone.blue * (d - 1) + target.blue) / d
  315.       @fog_tone.gray = (@fog_tone.gray * (d - 1) + target.gray) / d
  316.       @fog_tone_duration -= 1
  317.     end
  318.     # Manage change in fog opacity level
  319.     if @fog_opacity_duration >= 1
  320.       d = @fog_opacity_duration
  321.       @fog_opacity = (@fog_opacity * (d - 1) + @fog_opacity_target) / d
  322.       @fog_opacity_duration -= 1
  323.     end
  324.   end
  325. end
复制代码
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
2 小时
注册时间
2007-8-13
帖子
11
8
发表于 2008-3-16 21:41:13 | 只看该作者
还有  跳跃事上面有东西就碰头  把重力脚本的第239行的
#----------------------自由落体--------------------------------
          if not $ud_ok
           @jumpnow -= 10
  239行    if @jumpnow < 0     
           @jumpnow = [@jumpnow, -@JUMPMAX].max
          if not down1(((@x * 128 + @revise_x) / 128.0).round,
          ( (@y * 128 + @rev
0改为100000就解决了
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
4 小时
注册时间
2008-1-16
帖子
43
9
发表于 2008-3-20 06:07:30 | 只看该作者
又说18号放出,到今天还没出!
真像永远只有一个! 仙3续传,完成了5%.
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
9 小时
注册时间
2006-4-26
帖子
444
10
 楼主| 发表于 2008-3-21 21:46:23 | 只看该作者
以下引用rongqingmei于2008-3-16 13:14:50的发言:

看了录象  真的好佩服你  可是也有许多美中不足的地方  像跳跃时屏幕一震一震的 我推荐个脚本 #==============================================================================
# ** Smooth_Scrolling
#------------------------------------------------------------------------------
#  Script by Toby Zerner
#  Gives scrolling a 'smooth' effect (deceleration).
#==============================================================================

class Game_Map
  attr_accessor :deceleration_start
  attr_accessor :deceleration_speed
  #--------------------------------------------------------------------------
  # * Setup
  #     map_id : map ID
  #--------------------------------------------------------------------------
  alias ss_setup setup
  def setup(map_id)
   
    # -- CONFIGURATION VARIABLES
    # When to start decelerating (bigger numbers mean ealier on) [default: 4]
    @deceleration_start = 13
    # How fast to decelerate (bigger numbers mean quicker) [default: 4]
    @deceleration_speed = 13
    # -- END CONFIGURATION VARIABLES
   
    # Call the old setup method
    ss_setup(map_id)
    # Initialize smooth scrolling variables
    # scroll_remain: the number of pixels * 4 the still need to be scrolled
    @scroll_remain_x = 0
    @scroll_remain_y = 0
    # scroll_take: the number of pixels * 4 that are being scrolled every frame
    #   i.e. scrolling speed
    @scroll_take_x = 0
    @scroll_take_y = 0
    # scroll_decel: variables for calculating decelaration
    @scroll_decel_x = 0
    @scroll_decel_y = 0
  end
  #--------------------------------------------------------------------------
  # * Scroll Down
  #     distance : scroll distance
  #--------------------------------------------------------------------------
  def scroll_down(distance)
    # Ceil the distance
    distance = distance.ceil
    # If the map is scrolling from an event command, then use that scroll speed
    if scrolling? then @scroll_take_y = 2 ** @scroll_speed
    # If the map is not scrolling
    else
      # Make sure the distance is always divisible by 4
      if distance.ceil % 4 == 0 then @scroll_take_y = distance.ceil
      elsif distance.ceil % 4 <= 2 then @scroll_take_y = distance.ceil - distance.ceil % 4
      else @scroll_take_y = distance.ceil + (4 - (distance.ceil % 4)) end
    end
    # If scrolling coordinates are inside the map's boundaries
    unless @display_y + @scroll_remain_y + distance > (self.height - 20) * 128
      # Add onto the amount left to be scrolled
      @scroll_remain_y += distance
    end
  end
  #--------------------------------------------------------------------------
  # * Scroll Left
  #     distance : scroll distance
  #--------------------------------------------------------------------------
  def scroll_left(distance)
    # Ceil the distance
    distance = distance.ceil
    # If the map is scrolling from an event command, then use that scroll speed
    if scrolling? then @scroll_take_x = 2 ** @scroll_speed
    # If the map is not scrolling
    else
      # Make sure the distance is always divisible by 4
      if distance.ceil % 4 == 0 then @scroll_take_x = distance.ceil
      elsif distance.ceil % 4 <= 2 then @scroll_take_x = distance.ceil - distance.ceil % 4
      else @scroll_take_x = distance.ceil + (4 - (distance.ceil % 4)) end
    end
    # If scrolling coordinates are inside the map's boundaries
    unless @display_x - @scroll_remain_x - distance < 0
      # Add onto the amount left to be scrolled
      @scroll_remain_x -= distance
    end
  end
  #--------------------------------------------------------------------------
  # * Scroll Right
  #     distance : scroll distance
  #--------------------------------------------------------------------------
  def scroll_right(distance)
    # Ceil the distance
    distance = distance.ceil
    # If the map is scrolling from an event command, then use that scroll speed
    if scrolling? then @scroll_take_x = 2 ** @scroll_speed
    # If the map is not scrolling
    else
      # Make sure the distance is always divisible by 4
      if distance.ceil % 4 == 0 then @scroll_take_x = distance.ceil
      elsif distance.ceil % 4 <= 2 then @scroll_take_x = distance.ceil - distance.ceil % 4
      else @scroll_take_x = distance.ceil + (4 - (distance.ceil % 4)) end
    end
    # If scrolling coordinates are inside the map's boundaries
    unless @display_x + @scroll_remain_x + distance > (self.width - 20) * 128
      # Add onto the amount left to be scrolled
      @scroll_remain_x += distance
    end
  end
  #--------------------------------------------------------------------------
  # * Scroll Up
  #     distance : scroll distance
  #--------------------------------------------------------------------------
  def scroll_up(distance)
    # Ceil the distance
    distance = distance.ceil
    # If the map is scrolling from an event command, then use that scroll speed
    if scrolling? then @scroll_take_y = 2 ** @scroll_speed
    # If the map is not scrolling
    else
      # Make sure the distance is always divisible by 4
      if distance.ceil % 4 == 0 then @scroll_take_y = distance.ceil
      elsif distance.ceil % 4 <= 2 then @scroll_take_y = distance.ceil - distance.ceil % 4
      else @scroll_take_y = distance.ceil + (4 - (distance.ceil % 4)) end
    end
    # If scrolling coordinates are inside the map's boundaries
    unless @display_y - @scroll_remain_y - distance < 0
      # Add onto the amount left to be scrolled
      @scroll_remain_y -= distance
    end
  end
  #--------------------------------------------------------------------------
  # * Start Scroll
  #     direction : scroll direction
  #     distance  : scroll distance
  #     speed     : scroll speed
  #--------------------------------------------------------------------------
  def start_scroll(direction, distance, speed)
    # Set scrolling variables
    distance          = distance.ceil * 128
    @scroll_direction = direction
    @scroll_speed     = speed
    @scroll_rest      = distance
    # Execute scrolling
    case @scroll_direction
    when 2  # Down
      scroll_down(@scroll_rest)
    when 4  # Left
      scroll_left(@scroll_rest)
    when 6  # Right
      scroll_right(@scroll_rest)
    when 8  # Up
      scroll_up(@scroll_rest)
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  # This method could not be aliased because the scrolling part of the old
  # method has been rewritten.
  #--------------------------------------------------------------------------
  def update
    # Refresh map if necessary
    if $game_map.need_refresh
      refresh
    end
   
    #--------------------------------------------------------
    # If the map is still scrolling
    if @scroll_rest > 0 then @scroll_rest -= 2 ** @scroll_speed end
   
    # If the x axis needs to be scrolled to the right
    if @scroll_remain_x > 0
      # If the amount to be scrolled is close enough to 0 to decelerate
      if @scroll_remain_x <= @scroll_take_x * @deceleration_start
        old_display_x = @display_x
        # Add onto the deceleration variable
        @scroll_decel_x += @deceleration_speed
        # Work out how much to scroll
        distance = [@scroll_take_x - @scroll_decel_x, 4].max
        # If the scrolling coordinates are within the map's boundaries
        unless @display_x + distance > (self.width - 20) * 128
          @display_x += distance
        end
        # Subtract the amount that was scrolled
        @scroll_remain_x += old_display_x - @display_x
        if @scroll_remain_x < 0 then @scroll_remain_x = 0 end
      # Otherwise, scroll at a normal speed
      else
        # Reset the deceleration variable
        @scroll_decel_x = 0
        # If the scrolling coordinates are out of range
        if @display_x + @scroll_take_x > (self.width - 20) * 128
          @display_x = (self.width - 20) * 128
          @scroll_remain_x = 0
        # Otherwise, scroll normally
        else
          @display_x += @scroll_take_x
          @scroll_remain_x -= @scroll_take_x
        end
      end
      
    # If the x axis needs to be scrolled to the left
    elsif @scroll_remain_x < 0
      # If the amount to be scrolled is close enough to 0 to decelerate
      if @scroll_remain_x >= -@scroll_take_x * @deceleration_start
        old_display_x = @display_x
        # Add onto the deceleration variable
        @scroll_decel_x += @deceleration_speed
        # Work out how much to scroll
        distance = [@scroll_take_x - @scroll_decel_x, 4].max
        # If the scrolling coordinates are within the map's boundaries
        unless @display_x - distance < 0
          @display_x -= distance
        end
        # Subtract the amount that was scrolled
        @scroll_remain_x += old_display_x - @display_x
        if @scroll_remain_x > 0 then @scroll_remain_x = 0 end
      # Otherwise, scroll at a normal speed
      else
        # Reset the deceleration variable
        @scroll_decel_x = 0
        # If the scrolling coordinates are out of range
        if @display_x - @scroll_take_x < 0
          @display_x = 0
          @scroll_remain_x = 0
        # Otherwise, scroll normally
        else
          @display_x -= @scroll_take_x
          @scroll_remain_x += @scroll_take_x
        end
      end
   
    # If no x scrolling needs to be done, reset the deceleration variable
    else @scroll_decel_x = 0 end
   
    # If the y axis needs to be scrolled downwards
    if @scroll_remain_y > 0
      # If the amount to be scrolled is close enough to 0 to decelerate
      if @scroll_remain_y <= @scroll_take_y * @deceleration_start
        old_display_y = @display_y
        # Add onto the deceleration variable
        @scroll_decel_y += @deceleration_speed
        # Work out how much to scroll
        distance = [@scroll_take_y - @scroll_decel_y, 4].max
        # If the scrolling coordinates are within the map's boundaries
        unless @display_y + distance > (self.height - 15) * 128
          @display_y += distance
        end
        # Subtract the amount that was scrolled
        @scroll_remain_y += old_display_y - @display_y
        if @scroll_remain_y < 0 then @scroll_remain_y = 0 end
      # Otherwise, scroll at a normal speed
      else
        # Reset the deceleration variable
        @scroll_speed_accel_y = 0
        # If the scrolling coordinates are out of range
        if @display_y + @scroll_take_y > (self.height - 15) * 128
          @display_y = (self.height - 15) * 128
          @scroll_remain_y = 0
        # Otherwise, scroll normally
        else
          @display_y += @scroll_take_y
          @scroll_remain_y -= @scroll_take_y
        end
      end
   
    # If the y axis needs to be scrolled downwards
    elsif @scroll_remain_y < 0
      # If the amount to be scrolled is close enough to 0 to decelerate
      if @scroll_remain_y >= -@scroll_take_y * @deceleration_start
        old_display_y = @display_y
        # Add onto the deceleration variable
        @scroll_decel_y += @deceleration_speed
        # Work out how much to scroll
        distance = [@scroll_take_y - @scroll_decel_y, 4].max
        # If the scrolling coordinates are within the map's boundaries
        unless @display_y - distance < 0
          @display_y -= distance
        end
        # Subtract the amount that was scrolled
        @scroll_remain_y += old_display_y - @display_y
        if @scroll_remain_y > 0 then @scroll_remain_y = 0 end
      # Otherwise, scroll at a normal speed
      else
        # Reset the deceleration variable
        @scroll_speed_accel_y = 0
        # If the scrolling coordinates are out of range
        if @display_y - @scroll_take_y < 0
          @display_y = 0
          @scroll_remain_y = 0
        # Otherwise, scroll normally
        else
          @display_y -= @scroll_take_y
          @scroll_remain_y += @scroll_take_y
        end
      end
   
    # If no y scrolling needs to be done, reset the deceleration variable
    else @scroll_decel_y = 0 end
    #--------------------------------------------------------
   
    # Update map event
    for event in @events.values
      event.update
    end
    # Update common event
    for common_event in @common_events.values
      common_event.update
    end
    # Manage fog scrolling
    @fog_ox -= @fog_sx / 8.0
    @fog_oy -= @fog_sy / 8.0
    # Manage change in fog color tone
    if @fog_tone_duration >= 1
      d = @fog_tone_duration
      target = @fog_tone_target
      @fog_tone.red = (@fog_tone.red * (d - 1) + target.red) / d
      @fog_tone.green = (@fog_tone.green * (d - 1) + target.green) / d
      @fog_tone.blue = (@fog_tone.blue * (d - 1) + target.blue) / d
      @fog_tone.gray = (@fog_tone.gray * (d - 1) + target.gray) / d
      @fog_tone_duration -= 1
    end
    # Manage change in fog opacity level
    if @fog_opacity_duration >= 1
      d = @fog_opacity_duration
      @fog_opacity = (@fog_opacity * (d - 1) + @fog_opacity_target) / d
      @fog_opacity_duration -= 1
    end
  end
end
以下引用rongqingmei于2008-3-16 13:41:13的发言:

还有  跳跃事上面有东西就碰头  把重力脚本的第239行的
#----------------------自由落体--------------------------------
         if not $ud_ok
          @jumpnow -= 10
239行    if @jumpnow < 0     
          @jumpnow = [@jumpnow, -@JUMPMAX].max
         if not down1(((@x * 128 + @revise_x) / 128.0).round,
         ( (@y * 128 + @rev
0改为100000就解决了

感谢你~那个脚本有冲突就不用了~~
不过这个碰头的现象谢谢你了..可惜在不可通行的地方就用不得这个~到了不可通行的图块里就不能移动了~~

游戏正在向第一章发展.要不了几个星期了.因为只有星期6与星期7我可以制作.
希望大家多多包涵~
群:13283861
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-24 16:55

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表