Auto Revive State
Made for a request here.This script allows a state to auto revive and heal the actor when he/she is dead during the state is applied.
Features:
Auto revive when dead
Able to set heal % for revive
Able to set animation for revive
Able to set whether or not to reset states when dead during the state is applied
How to Use:
Paste the script below Material and above Main in your script editor
Edit the settings area in the script accordingly
Compatibility:
This script is using alias method, so it's unlikely to cause any conflicts.
If you find it not working right, simple place this script below other custom script will do the trick.
Terms of Use:
Free for both commercial and non-commercial
Script:
Spoiler Code:
#==============================================================================# ■ Meow Face Auto Revive#------------------------------------------------------------------------------# Auto Revive when dead#==============================================================================module MEOWREVIVE #DO NOT REMOVE!#==============================================================================# Settings Area#============================================================================== STATE_ID = 28 #State ID that auto revive when dead HEAL_PERCENT = 10 #HP% to heal when revive ANIMATION_ID = 42 #Animation to Play when revived CLEAR_STATES = true #Clear States when Dead (true/false)#==============================================================================# End of Settings Area# Edit anything past this line at your own risk!#==============================================================================endclass Game_Battler < Game_BattlerBase alias meowdie die def die if state?(MEOWREVIVE::STATE_ID) @hp = .max @animation_id = MEOWREVIVE::ANIMATION_ID if MEOWREVIVE::CLEAR_STATES clear_states clear_buffs end else meowdie end endend
本贴来自国际rpgmaker官方论坛作者:MeowFace处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/auto-revive-state.51604/
页:
[1]