Douglanilo
Mestre
Postagens : 959 Data de inscrição : 02/04/2009
| Assunto: Shake Effect V 1.0 Dom Abr 19, 2009 5:23 pm | |
| Shake Effect V 1.0 Moghunter (Last Update 08/06/2007) CARACTERÍSTICASPermite que certas habilidades e danos críticos causem tremor na tela. UTILIZAÇÃOCrie um atributo no banco de dados com o nome de Shake e atribua a skill desejada. SCRIPT - Código:
-
#_______________________________________________________________________________ # MOG Shake Effects V1.0 (08/06/2007) #_______________________________________________________________________________ # By Moghunter # http://www.atelier-rgss.com #_______________________________________________________________________________ # - Permite que certas habilidades causem tremor na tela. # - Danos críticos causam tremor na tela. #_______________________________________________________________________________ module MOG #------------------------------------------------------------------------------- # Definição do nome do elemento que causará o tremor. SHAKE_ELEMENT = "Shake" #------------------------------------------------------------------------------- # Som do dano crítico. CRITICAL_SE = "054-Cannon03" #------------------------------------------------------------------------------- # Som da esquiva. MISS_SE = "017-Jump03" #------------------------------------------------------------------------------- # Ativar Flash na tela. FLASH_HIT = true #------------------------------------------------------------------------------- end $mogscript = {} if $mogscript == nil $mogscript["Shake_Effect"] = true ################ # Scene_Battle # ################ class Scene_Battle alias mog55_update_phase4_step5 update_phase4_step5 def update_phase4_step5 for tgt in @target_battlers if @active_battler.current_action.kind == 1 and tgt.damage > 0 and tgt.damage != "Miss" skill_shake(@active_battler.current_action.skill_id) end if tgt.critical == true $game_screen.start_shake(5,10,20) Audio.se_play("Audio/SE/" + MOG::CRITICAL_SE ,100,100) rescue nil $game_screen.start_flash(Color.new(255,0,0,150), 20) if MOG::FLASH_HIT == true elsif tgt.damage == "Miss" Audio.se_play("Audio/SE/" + MOG::MISS_SE ,100,100) rescue nil $game_screen.start_flash(Color.new(0,0,0,150), 20) end end mog55_update_phase4_step5 end def skill_shake(skill_id) if @skill.element_set.include?($data_system.elements.index(MOG::SHAKE_ELEMENT)) $game_screen.start_shake(5,10,20) Audio.se_play("Audio/SE/" + MOG::CRITICAL_SE ,100,100) rescue nil $game_screen.start_flash(Color.new(255,0,0,150), 20) if MOG::FLASH_HIT == true return true end return false end end |
|