加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
我这样把图片消失放到前面,图片是可以显示几秒消失,不过事件的移动也是同时进行的,并不是图片显示完后再移动。
可我要是把事件的移动放到前面图片消失后面,那么事件移动完后就不能自动寻路了。
就现在这样事件移动过来是可以自动寻路的,不过我想要等图片显示几秒后再让事件移动过来。
def jjc_npc_huanren $game_screen.pictures[1].erase if $hrtplq<=0 $hr_hp_pd = {} $game_variables[24] = $game_map.events.values.select{|ev| ev.event.name == "Enemy"} $npc_zb_chong = $game_map.events.values.select{|ev| ev.event.name == "Enemyzb"} #换人坐标 $dr_hr_zb = [$game_map.events[$game_variables[24][0].id].x , $game_map.events[$game_variables[24][0].id].y] unless $game_map.events[$game_variables[24][0].id] == nil if $game_variables[24].size == 0 and $npc_zb_chong .size > 0 $game_screen.pictures[1].show("dfhr.png",1,320,240,100,100,255,0) Audio.se_play("Audio/SE/013-Move01",100,100) $hrtplq = 200 #换上待机中血最多的宠。 for i in $npc_zb_chong $hr_hp_pd[i.id] = i.battler.hp end while $hr_hp_pd.size >1 $hr_hp_pd[$hr_hp_pd.keys[0]] >= $hr_hp_pd[$hr_hp_pd.keys[1]] $hr_hp_pd.delete($hr_hp_pd.keys[1]) end $game_map.events[$hr_hp_pd.keys[0]].moveto($dr_hr_zb[0], $dr_hr_zb[1]) unless $game_map.events[$hr_hp_pd.keys[0]] == nil $game_map.events[$hr_hp_pd.keys[0]].name = "Enemy" unless $game_map.events[$hr_hp_pd.keys[0]] == nil # 换人冷却时间 $hrlq = 2400 end
def jjc_npc_huanren
$game_screen.pictures[1].erase if $hrtplq<=0
$hr_hp_pd = {}
$game_variables[24] = $game_map.events.values.select{|ev| ev.event.name == "Enemy"}
$npc_zb_chong = $game_map.events.values.select{|ev| ev.event.name == "Enemyzb"}
#换人坐标
$dr_hr_zb = [$game_map.events[$game_variables[24][0].id].x , $game_map.events[$game_variables[24][0].id].y] unless $game_map.events[$game_variables[24][0].id] == nil
if $game_variables[24].size == 0 and $npc_zb_chong .size > 0
$game_screen.pictures[1].show("dfhr.png",1,320,240,100,100,255,0)
Audio.se_play("Audio/SE/013-Move01",100,100)
$hrtplq = 200
#换上待机中血最多的宠。
for i in $npc_zb_chong
$hr_hp_pd[i.id] = i.battler.hp
end
while $hr_hp_pd.size >1
$hr_hp_pd[$hr_hp_pd.keys[0]] >= $hr_hp_pd[$hr_hp_pd.keys[1]]
$hr_hp_pd.delete($hr_hp_pd.keys[1])
end
$game_map.events[$hr_hp_pd.keys[0]].moveto($dr_hr_zb[0], $dr_hr_zb[1]) unless $game_map.events[$hr_hp_pd.keys[0]] == nil
$game_map.events[$hr_hp_pd.keys[0]].name = "Enemy" unless $game_map.events[$hr_hp_pd.keys[0]] == nil
# 换人冷却时间
$hrlq = 2400
end
|