Project1

标题: 求助,事件.moveto过来的时间太慢了 [打印本页]

作者: yang1zhi    时间: 2016-4-11 13:36
标题: 求助,事件.moveto过来的时间太慢了
RUBY 代码复制
  1. class Game_Character
  2.   def jjc_npc_huanren
  3. $game_variables[24] = $game_map.events.values.select{|ev| ev.event.name == "Enemy"}
  4. $npc_zb_chong = $game_map.events.values.select{|ev| ev.event.name == "Enemyzb"}
  5. if $game_map.events[$game_variables[24][0].id] == nil and $game_map.events[$game_variables[24][1].id] == nil
  6. $game_map.events[$npc_zb_chong[0].id].moveto(10, 0) unless $game_map.events[$npc_zb_chong[0].id] == nil
  7. $game_map.events[$npc_zb_chong[0].id].name = "Enemy" unless $game_map.events[$npc_zb_chong[0].id] == nil
  8. $game_map.events[$npc_zb_chong[1].id].moveto(10, 0) unless $game_map.events[$npc_zb_chong[1].id] == nil
  9. $game_map.events[$npc_zb_chong[1].id].name = "Enemy" unless $game_map.events[$npc_zb_chong[1].id] == nil
  10. #    换人冷却时间
  11.   $hrlq = 2400
  12. end
  13. #unless $game_map.events[$game_variables[24][0].id] == nil or $game_map.events[$game_variables[24][1].id] == nil
  14. # if ($game_variables[24][0].battler.hp <= $game_variables[24][0].battler.maxhp.to_f/100*50 or
  15. #  $game_variables[24][1].battler.hp <= $game_variables[24][1].battler.maxhp.to_f/100*50) and $hrlq<=0
  16. # $npc_zb_chong = $game_map.events.values.select{|ev| ev.event.name == "Enemyzb"}
  17. #  $npc_zb_chong[0].moveto(10, 0)
  18. #  $npc_zb_chong[1].moveto(10, 0)
  19. #  $game_variables[24][0].moveto(59, 0)
  20. #  $game_variables[24][1].moveto(59, 0)
  21.  
  22.  
  23. #$game_variables[24][0].name = "Enemyzb"
  24. #$game_variables[24][1].name = "Enemyzb"
  25. #$npc_zb_chong[0].name = "Enemy"
  26. #$npc_zb_chong[1].name = "Enemy"
  27.  
  28.  
  29.  
  30.     #换人冷却时间
  31. # $hrlq = 2400
  32. # end
  33. #end
  34. end
  35. end





欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1