以下引用darkten于2008-2-28 13:03:02的发言:
用这个教程的方法...
“战斗时候只让前面几个队员参战”
http://rpg.blue/web/htm/news854.htm
注意教程里的这一段...
4、拓展功能:非连续编号离队。
注意这个地方:for i in begin_id-1..finish_id-1
如果改为 for i in [1,4,6,7]
那么队伍的1/4/6/7号队员将离队。结合3,以此可以拓展更多功能。比如你编写如下:
for i in $game_variables[3],然后在事件中使用脚本$game_variables[3] = [1,4,5,6],就会有1、4、5、6号在战斗时候离队。这是一个很好用的脚本接口。
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
[本贴由作者于 2008-2-28 13:03:44 最后编辑]
以下引用patrick于2008-3-1 16:59:02的发言:
以下引用darkten于2008-2-28 13:03:02的发言:
用这个教程的方法...
“战斗时候只让前面几个队员参战”
http://rpg.blue/web/htm/news854.htm
注意教程里的这一段...
4、拓展功能:非连续编号离队。
注意这个地方:for i in begin_id-1..finish_id-1
如果改为 for i in [1,4,6,7]
那么队伍的1/4/6/7号队员将离队。结合3,以此可以拓展更多功能。比如你编写如下:
for i in $game_variables[3],然后在事件中使用脚本$game_variables[3] = [1,4,5,6],就会有1、4、5、6号在战斗时候离队。这是一个很好用的脚本接口。
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
[本贴由作者于 2008-2-28 13:03:44 最后编辑]
大多东西站内早有,自己尝试搜索一下
以下引用Iselia雪于2008-3-1 17:01:51的发言:
需要改四五个地方- -没那么简单了。
Window_MenuStatus
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size - 1
for i in 1...$game_party.actors.size
x = 64
y = (i - 1) * 116
actor = $game_party.actors
draw_actor_graphic(actor, x - 40, y + 80)
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 144, y)
draw_actor_level(actor, x, y + 32)
draw_actor_state(actor, x + 90, y + 32)
draw_actor_exp(actor, x, y + 64)
draw_actor_hp(actor, x + 236, y + 32)
draw_actor_sp(actor, x + 236, y + 64)
end
end
Scene_Menu
#--------------------------------------------------------------------------
# ● 刷新画面 (状态窗口被激活的情况下)
#--------------------------------------------------------------------------
def update_status
# 按下 B 键的情况下
if Input.trigger?(Input::B)
# 演奏取消 SE
$game_system.se_play($data_system.cancel_se)
# 激活命令窗口
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
# 按下 C 键的情况下
if Input.trigger?(Input::C)
# 命令窗口的光标位置分支
case @command_window.index
when 1 # 特技
# 本角色的行动限制在 2 以上的情况下
if $game_party.actors[@status_window.index].restriction >= 2
# 演奏冻结 SE
$game_system.se_play($data_system.buzzer_se)
return
end
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
# 切换到特技画面
$scene = Scene_Skill.new(@status_window.index + 1)
when 2 # 装备
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
# 切换的装备画面
$scene = Scene_Equip.new(@status_window.index + 1)
when 3 # 状态
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
# 切换到状态画面
$scene = Scene_Status.new(@status_window.index + 1)
end
return
end
end
Window_Target
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 0, 336, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.z += 10
@item_max = $game_party.actors.size - 1
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 1...$game_party.actors.size
x = 4
y = (i-1) * 116
actor = $game_party.actors
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 144, y)
draw_actor_level(actor, x + 8, y + 32)
draw_actor_state(actor, x + 8, y + 64)
draw_actor_hp(actor, x + 152, y + 32)
draw_actor_sp(actor, x + 152, y + 64)
end
end
Window_Battlestatus
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 1...$game_party.actors.size
actor = $game_party.actors
actor_x = (i-1) * 160 + 4
draw_actor_name(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 32, 120)
draw_actor_sp(actor, actor_x, 64, 120)
if @level_up_flags
self.contents.font.color = normal_color
self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
else
draw_actor_state(actor, actor_x, 96)
end
end
end
Window_Shopstatus
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
if @item == nil
return
end
case @item
when RPG::Item
number = $game_party.item_number(@item.id)
when RPG::Weapon
number = $game_party.weapon_number(@item.id)
when RPG::Armor
number = $game_party.armor_number(@item.id)
end
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 200, 32, "所持数")
self.contents.font.color = normal_color
self.contents.draw_text(204, 0, 32, 32, number.to_s, 2)
if @item.is_a?(RPG::Item)
return
end
# 添加装备品信息
for i in 1...$game_party.actors.size
# 获取角色
actor = $game_party.actors
# 可以装备为普通文字颜色、不能装备设置为无效文字颜色
if actor.equippable?(@item)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
# 描绘角色名字
self.contents.draw_text(4, 64 + 64 * i, 120, 32, actor.name)
# 获取当前的装备品
if @item.is_a?(RPG::Weapon)
item1 = $data_weapons[actor.weapon_id]
elsif @item.kind == 0
item1 = $data_armors[actor.armor1_id]
elsif @item.kind == 1
item1 = $data_armors[actor.armor2_id]
elsif @item.kind == 2
item1 = $data_armors[actor.armor3_id]
else
item1 = $data_armors[actor.armor4_id]
end
# 可以装备的情况
if actor.equippable?(@item)
# 武器的情况
if @item.is_a?(RPG::Weapon)
atk1 = item1 != nil ? item1.atk : 0
atk2 = @item != nil ? @item.atk : 0
change = atk2 - atk1
end
# 防具的情况
if @item.is_a?(RPG::Armor)
pdef1 = item1 != nil ? item1.pdef : 0
mdef1 = item1 != nil ? item1.mdef : 0
pdef2 = @item != nil ? @item.pdef : 0
mdef2 = @item != nil ? @item.mdef : 0
change = pdef2 - pdef1 + mdef2 - mdef1
end
# 描绘能力值变化
self.contents.draw_text(124, 64 + 64 * i, 112, 32,
sprintf("%+d", change), 2)
end
# 描绘物品
if item1 != nil
x = 4
y = 64 + 64 * i + 32
bitmap = RPG::Cache.icon(item1.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 212, 32, item1.name)
end
end
end
一个好系统不是能问出来的,自己学吧- -+
以下引用做游戏的新手于2008-3-1 17:31:33的发言:
似乎不是这样....
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |