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

Project1

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

请问怎么弄才能按空格键就能使角色加速???

 关闭 [复制链接]
头像被屏蔽

Lv1.梦旅人 (禁止发言)

漣漪

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-7-29
帖子
206
跳转到指定楼层
1
发表于 2007-7-29 06:02:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
头像被屏蔽

Lv1.梦旅人 (禁止发言)

漣漪

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-7-29
帖子
206
2
 楼主| 发表于 2007-7-29 06:02:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽

Lv1.梦旅人

看不到我

梦石
0
星屑
50
在线时间
229 小时
注册时间
2005-11-6
帖子
1741

贵宾

3
发表于 2007-7-29 06:04:22 | 只看该作者
http://rpg.blue/web/htm/news350.htm
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-7-29
帖子
453
4
发表于 2007-7-29 06:04:58 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3947
在线时间
1591 小时
注册时间
2006-5-5
帖子
2746
5
发表于 2007-7-29 06:15:42 | 只看该作者
    用下面的脚本就可以了!

  1. #==============================================================================
  2. # 选项动态加强
  3. # 作者:carol3
  4. #==============================================================================
  5. # ■ Window_Command
  6. #------------------------------------------------------------------------------
  7. #  一般的命令选择行窗口。
  8. #==============================================================================

  9. class Window_Command < Window_Selectable
  10.   #--------------------------------------------------------------------------
  11.   # ● 初始化对像
  12.   # width : 窗口的宽
  13.   # commands : 命令字符串序列
  14.   #--------------------------------------------------------------------------
  15.   def initialize(width, commands)
  16.     # 由命令的个数计算出窗口的高
  17.     super(0, 0, width, commands.size * 32 + 32)
  18.     @item_max = commands.size
  19.     @commands = commands
  20.     self.contents = Bitmap.new(width - 32, @item_max * 32)
  21.     @item = []
  22.     self.index = 0
  23.     refresh
  24.     @oldindex = 0
  25.   end
  26.   #--------------------------------------------------------------------------
  27.   # ● 刷新
  28.   #--------------------------------------------------------------------------
  29.   def refresh
  30.     self.contents.clear
  31.     for i in 0...@item_max
  32.       if i != self.index
  33.         draw_item_dis(i)
  34.       else
  35.         draw_item_active(i,@item[i])
  36.       end
  37.     end
  38.   end
  39.   #--------------------------------------------------------------------------
  40.   # ● 描绘项目
  41.   # index : 项目编号
  42.   # color : 文字色
  43.   #--------------------------------------------------------------------------
  44.   def draw_item_dis(index)
  45.     self.contents.font.size -= 2
  46.     self.contents.font.color = disabled_color
  47.     rect = Rect.new(4+16, 32 * index, self.contents.width - 24, 32)
  48.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  49.     self.contents.draw_text(rect, @commands[index])
  50.     self.contents.font.size += 2
  51.   end
  52.   def draw_item_active(index, type)
  53.     self.contents.font.color = Color.new(0,0,0,255)
  54.     self.contents.draw_text(5,32*index+1,self.contents.width,32, @commands[index])
  55.     if type==1
  56.       self.contents.font.color = disabled_color
  57.     else
  58.       self.contents.font.color = Color.new(255,255,220,255)
  59.     end
  60.     self.contents.draw_text(4,32*index,self.contents.width,32, @commands[index])
  61.   end
  62.   #--------------------------------------------------------------------------
  63.   # ● 项目无效化
  64.   # index : 项目编号
  65.   #--------------------------------------------------------------------------
  66.   def disable_item(index)
  67.     @item[index] = 1
  68.   end  
  69.   #--------------------------------------------------------------------------
  70.   # ● 刷新方法更新
  71.   #--------------------------------------------------------------------------
  72.   def update
  73.     super
  74.     #——这里使用的刷新方法比直接refresh节约很多内存
  75.     if self.index != @oldindex
  76.       @oldindex = self.index
  77.       refresh
  78.     end
  79.   end
  80. end
复制代码
步兵中尉
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-7-27
帖子
135
6
发表于 2007-7-29 16:16:39 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
4 小时
注册时间
2007-3-7
帖子
140
7
发表于 2007-7-29 16:57:37 | 只看该作者
是不是这个?
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================

  4. # ▼▲▼ XRXS25. ダッシュ機能 ver.2 ▼▲▼
  5. # by 桜雅 在土 (基本、再改訂)
  6. #    Tetra-Z   (改訂原案)

  7. #==============================================================================
  8. # □ カスタマイズポイント
  9. #==============================================================================
  10. module XRXS_Dash
  11. #
  12. # 按下加速键之后的速度増加量
  13. #
  14. PLUSPEED = 1
  15. #
  16. # 行走加速的按键
  17. #
  18. BUTTON = Input::C
  19. end
  20. #==============================================================================
  21. # ■ Game_Player
  22. #==============================================================================
  23. class Game_Player < Game_Character
  24. #--------------------------------------------------------------------------
  25. # ● フレーム更新
  26. #--------------------------------------------------------------------------
  27. alias xrxs25_update update
  28. def update
  29.    # 例外補正
  30.    if @move_speed_arcadia == nil
  31.      @move_speed_arcadia = @move_speed
  32.    end
  33.    # 移動中、イベント実行中、移動ルート強制中、
  34.    # メッセージウィンドウ表示中、
  35.    # ダッシュボタン挿下中、のいずれでもない場合
  36.    unless moving? or $game_system.map_interpreter.running? or
  37.           @move_route_forcing or $game_temp.message_window_showing
  38.      # 速度の変更
  39.      if Input.press?(XRXS_Dash::BUTTON)
  40.        @move_speed = @move_speed_arcadia + XRXS_Dash::PLUSPEED
  41.      else
  42.        @move_speed = @move_speed_arcadia
  43.      end
  44.    end
  45.    # 呼び戻す
  46.    xrxs25_update
  47. end
  48. #--------------------------------------------------------------------------
  49. # ○ 移動タイプ : カスタム [オーバーライド]
  50. #--------------------------------------------------------------------------
  51. def move_type_custom
  52.    # 例外補正
  53.    if @move_speed_arcadia == nil
  54.      @move_speed_arcadia = @move_speed
  55.    end
  56.    # 標準速度に戻す
  57.    @move_speed = @move_speed_arcadia
  58.    # 呼び戻す
  59.    super
  60.    # 速度の保存
  61.    @move_speed_arcadia = @move_speed
  62. end
  63. end

  64. #==============================================================================
  65. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  66. #==============================================================================
复制代码
来论坛混了3年多了,有2年半 潜水
— —的确我发现我注册的真早
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2026-7-2 00:53

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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