#_________________________________________________ # MOG_Warning System V1.2 #_________________________________________________ # By Moghunter # http://www.atelier-rgss.com #_________________________________________________ #Sistema de aviso quando o HP está baixo. #_________________________________________________ module MOG #Porcentagem para que o sistema de danger seja ativado. DG_LOWHP = 25 #Som que será ativado. DG_SE = "057-Wrong01" #Ativar flash na tela. DG_FLASH = true #Velocidade do aviso. DG_LOOP = 35 end #=============================================================================== # Game_Player #=============================================================================== class Game_Player < Game_Character #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- alias mog19_initialize initialize def initialize @warning = 0 mog19_initialize end #-------------------------------------------------------------------------- # update #-------------------------------------------------------------------------- alias mog19_update update def update @warning += 1 if @warning > MOG::DG_LOOP @warning = 0 end for i in 0...$game_party.actors.size actor = $game_party.actors[i] if actor.hp * 100 / actor.maxhp <= MOG::DG_LOWHP and @warning == 1 Audio.se_play("Audio/SE/" + MOG::DG_SE ,100,100) rescue nil if MOG::DG_FLASH == true $game_screen.start_flash(Color.new(255,50,0,128), 10) end end end mog19_update end end $mog_rgss_warning = true