Project1
标题:
如何让队伍中特定成员不参与战斗,请大家帮助
[打印本页]
作者:
zhaoxun96
时间:
2014-7-26 17:31
标题:
如何让队伍中特定成员不参与战斗,请大家帮助
RT,让一个特定角色在队伍中,但是不参与战斗。虽然我想过每次战斗的时候都把他给踢出队伍但是感觉好麻烦......
作者:
VIPArcher
时间:
2014-7-26 17:40
本帖最后由 VIPArcher 于 2014-7-26 17:43 编辑
#======================================================
# 某些角色不参与战斗,柳柳@66rpg.com
#======================================================
class Scene_Battle
#====================================================
# 不参与战斗的编号写在这里
#====================================================
I_AM_NPC = [1, 2, 3]
# 不参与战斗的角色,进入战斗的时候临时离队
alias o_start start unless $@
def start
@no_fight = []
for aid in I_AM_NPC
if $game_party.members.include?($game_actors[aid])
@no_fight.push(aid)
$game_party.remove_actor(aid)
end
end
o_start
end
# 离队的角色,结束战斗的时候叫回来
alias o_terminate terminate unless $@
def terminate
o_terminate
for aid in @no_fight
$game_party.add_actor(aid)
end
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1