MP Damage Effect
MP Damage Effect // When the player takes MP damage, a visual and audio effect happens (like with HP Damage).Customization:
[*]Change the SE for the damage effect.
[*]For advanced scripters, you can implement your own script calls in perform_mpdamage_effect.
Setup:
[*]Paste under the Materials slot, above main.
Known issues:
[*]None.
Usage Notes:
[*]Don't remove the author part of the header.
[*]Script is allowed for commercial and non-commercial projects.
[*]Users are free to modify the script as they wish for their own projects.
[*]Original post: https://forums.rpgmakerweb.com/index.php?threads/add-mp-damage-effect-solved.107614/#post-959398
Code:
#==============================================================================
#
# ** Title: MP Damage SE 1.0
# Author: ZirconStorms
# Created: April 2019 (Forum request)
#
#------------------------------------------------------------------------------
#
# Script is allowed for commercial and non-commercial games.
# In the game's credits or read.me, credit "ZirconStorms".
#
#==============================================================================
# Customizable Section Begins Here.
#==============================================================================
module GhostMPDamage
MPDAMAGESOUND = RPG::SE.new("Blind", 80, 100)
#Put SE audio file name in between quotes.
#First number value is volume.
#Second number value is pitch.
#You can adjust the commands in perform_mpdamage_effect if you want different
#screen effects or processes to run while the player gets MP Damage.
end
#==============================================================================
# Customizable Section Ends Here
#==============================================================================
class Game_Actor < Game_Battler
def perform_mpdamage_effect
$game_troop.screen.start_shake(5, 5, 10)
@sprite_effect_type = :blink
GhostMPDamage::MPDAMAGESOUND.play
end
end
class Window_BattleLog < Window_Selectable
alias ghost_display_mp_damage display_mp_damage
def display_mp_damage(target, item)
return if target.dead? || target.result.mp_damage == 0
if target.result.mp_damage > 0 && target.result.mp_drain == 0
target.perform_mpdamage_effect
end
Sound.play_recovery if target.result.mp_damage < 0
add_text(target.result.mp_damage_text)
wait
end
end
#===============================================================================
# End of Script
#===============================================================================
本贴来自国际rpgmaker官方论坛作者:tvghost处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/mp-damage-effect.107720/
页:
[1]