The World of EverGrand
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.


 
PortalPortal  InícioInício  ProcurarProcurar  Últimas imagensÚltimas imagens  RegistrarRegistrar  Entrar  

Compartilhe|

Shake Effect V 1.0

Ver o tópico anterior Ver o tópico seguinte Ir para baixo
AutorMensagem
Douglanilo
Douglanilo
Mestre
Mestre

Masculino Postagens : 959
Data de inscrição : 02/04/2009
Shake Effect V 1.0 11101010

Shake Effect V 1.0 Vide http://www.twevergrand.com
MensagemAssunto: Shake Effect V 1.0 Shake Effect V 1.0 EmptyDom Abr 19, 2009 5:23 pm

Shake Effect V 1.0
Moghunter
(Last Update 08/06/2007)

Shake Effect V 1.0 Script_Bat23_IM01
CARACTERÍSTICAS
Permite que certas habilidades e danos críticos causem tremor na tela.

UTILIZAÇÃO
Shake Effect V 1.0 Script_Bat23_IM02
Crie 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
Ir para o topo Ir para baixo

Shake Effect V 1.0

Ver o tópico anterior Ver o tópico seguinte Ir para o topo
Página 1 de 1

Permissões neste sub-fórumNão podes responder a tópicos
The World of EverGrand :: Programação em Linguagens :: Ruby Game Scripting System :: Scripts :: RPG Maker XP-