Greetings!
For some reason, I have been having some problems with MOG's Shake Effect script.
This particular problem occurs when an enemy or an ally cast some particular spell or skill and (I believe) they happen to crit. These skills are from RTP, so there weren't any modifications to them, nor they have special properties that have been brought from other scripts.
When said skills are used, the game simply crashes.
These are the lines in question, I believe.
And here's the full script. Moghunter doesn't display his XP scripts on his website anymore, only in a master demo.
Is there a way this can be fixed?
Thank you very much in advance.
For some reason, I have been having some problems with MOG's Shake Effect script.
This particular problem occurs when an enemy or an ally cast some particular spell or skill and (I believe) they happen to crit. These skills are from RTP, so there weren't any modifications to them, nor they have special properties that have been brought from other scripts.
When said skills are used, the game simply crashes.
Ruby:
for tgt in @target_battlers
if @active_battler.current_action.kind == 1 and tgt.damage > 0 and tgt.damage != "Miss"
Ruby:
#_______________________________________________________________________________
# MOG Shake Effects V1.1 (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 = "053-Cannon02"
#-------------------------------------------------------------------------------
# Som da esquiva.
MISS_SE = "017-Jump03"
#-------------------------------------------------------------------------------
# Ativar Flash na tela.
FLASH_HIT = true
#-------------------------------------------------------------------------------
end
#===============================================================================
# Scene_Battle
#===============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# update_phase4_step5
#--------------------------------------------------------------------------
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
#--------------------------------------------------------------------------
# skill_shake
#--------------------------------------------------------------------------
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
$mog_rgss_Shake_Effect = true
Is there a way this can be fixed?
Thank you very much in advance.