Project1
标题:
请问怎么弄才能按空格键就能使角色加速???
[打印本页]
作者:
〖失嬑】兲嬕
时间:
2007-7-29 06:02
提示:
作者被禁止或删除 内容自动屏蔽
作者:
〖失嬑】兲嬕
时间:
2007-7-29 06:02
提示:
作者被禁止或删除 内容自动屏蔽
作者:
小湖
时间:
2007-7-29 06:04
http://rpg.blue/web/htm/news350.htm
作者:
索尔迦·蓝
时间:
2007-7-29 06:04
提示:
作者被禁止或删除 内容自动屏蔽
作者:
步兵中尉
时间:
2007-7-29 06:15
用下面的脚本就可以了!
#==============================================================================
# 选项动态加强
# 作者:carol3
#==============================================================================
# ■ Window_Command
#------------------------------------------------------------------------------
# 一般的命令选择行窗口。
#==============================================================================
class Window_Command < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对像
# width : 窗口的宽
# commands : 命令字符串序列
#--------------------------------------------------------------------------
def initialize(width, commands)
# 由命令的个数计算出窗口的高
super(0, 0, width, commands.size * 32 + 32)
@item_max = commands.size
@commands = commands
self.contents = Bitmap.new(width - 32, @item_max * 32)
@item = []
self.index = 0
refresh
@oldindex = 0
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
if i != self.index
draw_item_dis(i)
else
draw_item_active(i,@item[i])
end
end
end
#--------------------------------------------------------------------------
# ● 描绘项目
# index : 项目编号
# color : 文字色
#--------------------------------------------------------------------------
def draw_item_dis(index)
self.contents.font.size -= 2
self.contents.font.color = disabled_color
rect = Rect.new(4+16, 32 * index, self.contents.width - 24, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index])
self.contents.font.size += 2
end
def draw_item_active(index, type)
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(5,32*index+1,self.contents.width,32, @commands[index])
if type==1
self.contents.font.color = disabled_color
else
self.contents.font.color = Color.new(255,255,220,255)
end
self.contents.draw_text(4,32*index,self.contents.width,32, @commands[index])
end
#--------------------------------------------------------------------------
# ● 项目无效化
# index : 项目编号
#--------------------------------------------------------------------------
def disable_item(index)
@item[index] = 1
end
#--------------------------------------------------------------------------
# ● 刷新方法更新
#--------------------------------------------------------------------------
def update
super
#——这里使用的刷新方法比直接refresh节约很多内存
if self.index != @oldindex
@oldindex = self.index
refresh
end
end
end
复制代码
作者:
Sgodboy卌
时间:
2007-7-29 16:16
提示:
作者被禁止或删除 内容自动屏蔽
作者:
电鳗
时间:
2007-7-29 16:57
是不是这个?
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
# ▼▲▼ XRXS25. ダッシュ機能 ver.2 ▼▲▼
# by 桜雅 在土 (基本、再改訂)
# Tetra-Z (改訂原案)
#==============================================================================
# □ カスタマイズポイント
#==============================================================================
module XRXS_Dash
#
# 按下加速键之后的速度増加量
#
PLUSPEED = 1
#
# 行走加速的按键
#
BUTTON = Input::C
end
#==============================================================================
# ■ Game_Player
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
alias xrxs25_update update
def update
# 例外補正
if @move_speed_arcadia == nil
@move_speed_arcadia = @move_speed
end
# 移動中、イベント実行中、移動ルート強制中、
# メッセージウィンドウ表示中、
# ダッシュボタン挿下中、のいずれでもない場合
unless moving? or $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing
# 速度の変更
if Input.press?(XRXS_Dash::BUTTON)
@move_speed = @move_speed_arcadia + XRXS_Dash::PLUSPEED
else
@move_speed = @move_speed_arcadia
end
end
# 呼び戻す
xrxs25_update
end
#--------------------------------------------------------------------------
# ○ 移動タイプ : カスタム [オーバーライド]
#--------------------------------------------------------------------------
def move_type_custom
# 例外補正
if @move_speed_arcadia == nil
@move_speed_arcadia = @move_speed
end
# 標準速度に戻す
@move_speed = @move_speed_arcadia
# 呼び戻す
super
# 速度の保存
@move_speed_arcadia = @move_speed
end
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1