Project1
标题:
我想让角色行动命令因人而异,该怎么办?
[打印本页]
作者:
szzyc0
时间:
2013-12-22 10:06
标题:
我想让角色行动命令因人而异,该怎么办?
比如1号阿尔西斯是攻击、特技、防御、物品,而2号帕吉尔是突刺、绝技、抵抗、道具。
作者:
恐惧剑刃
时间:
2013-12-22 10:20
本帖最后由 恋′挂机 于 2013-12-22 10:22 编辑
@actor_index
@actor_index 是角色的索引,可以分歧$game_actors[@actor_index]实现
在指令窗口(复制一份Window_Command)refresh后边加上参数(actor = nil)
分歧
unless actor.nil?
case actor.id
when 1
@commands = %|攻击 特技 防御 物品|
when 2
@commands = %|突刺 绝技 抵抗 道具|
end
end
去改变他的字符串序列即可
作者:
szzyc0
时间:
2013-12-22 11:42
http://rpg.blue/forum.php?mod=viewthread&tid=129370
我竟然搜到了。就这样吧。
作者:
恐惧剑刃
时间:
2013-12-22 11:57
# 放在Scene_Battle4下边
class Window_Command < Window_Selectable
def refresh(actor = nil)
self.contents.clear
if $scene.is_a?(Scene_Battle)
if not actor.nil?
case actor.id
when 2
@commands = ["突刺", "绝技", "抵抗", "道具"]
else
@commands = ["攻击", "特技", "防御", "物品"]
end
@item_max = @commands.size
end
end
for i in 0...@item_max
draw_item(i, normal_color)
end
end
end
class Scene_Battle
alias update_command_case update
def update
if @actor_index != nil and @ac_index != @actor_index
@ac_index = @actor_index
@actor_command_window.contents.clear
@actor_command_window.refresh($game_party.actors[@actor_index])
end
update_command_case
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1