Need help with a skill.

Hello.

 

I'm trying to create an auto-revive skill that revives the player if they die within, say, 3 turns of the spell being cast.

 

How can I do that?
That will require a script because player death otherwise ends the game and the death state removes all other states.


I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
Non-Script Method:

Normal death protection is being done by disable the Death State (in features) in the protection skill+state(for x turns). But that just prevents the player from dying not reviving. The other method is to use regeneration states (but this will not prevent death).

But combining both (Invincible at hp 1 minimum + auto regenerate) can make a similar state to do what you need without a script.

If you don't want the healing and just want to prevent death, just add a state that prevent death state will do the trick, the actor will stay at 1hp and not dying as long as he/she has that state applied.

Script Method:

Actor's states are all removed when they are dead (except the death state), making it hard to run a state after death without proper scripting.

So what you really want, will need a script that prevent the revive state being removed, prevent death state from being applied at hp 0, and heal the actor when hp = 0. Which, in the end, is very similar to the non-script method above. Plus using extra scripts that you don't really need adds to the chance of script conflicts and game crash.

But if you really must use a script, let me know and i'll see if i can make one.

Edit:

Script's done, paste it below Material and above Main

Did a small test with it and it's working fine, let me know if you run into any problem.

Script Link:

http://forums.rpgmakerweb.com/index.php?/topic/51604-auto-revive-state/
That will require a script because player death otherwise ends the game and the death state removes all other states.I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
  Okay, wasn't aware that it was in the wrong section, sorry about that.

Non-Script Method:

Normal death protection is being done by disable the Death State (in features) in the protection skill+state(for x turns). But that just prevents the player from dying not reviving. The other method is to use regeneration states (but this will not prevent death).

But combining both (Invincible at hp 1 minimum + auto regenerate) can make a similar state to do what you need without a script.

If you don't want the healing and just want to prevent death, just add a state that prevent death state will do the trick, the actor will stay at 1hp and not dying as long as he/she has that state applied.

Script Method:

Actor's states are all removed when they are dead (except the death state), making it hard to run a state after death without proper scripting.

So what you really want, will need a script that prevent the revive state being removed, prevent death state from being applied at hp 0, and heal the actor when hp = 0. Which, in the end, is very similar to the non-script method above. Plus using extra scripts that you don't really need adds to the chance of script conflicts and game crash.

But if you really must use a script, let me know and i'll see if i can make one.

Edit:

Script's done, paste it below Material and above Main

Did a small test with it and it's working fine, let me know if you run into any problem.

Instructions in script.

#==============================================================================# ■ 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#==============================================================================# End of Settings Area# Edit anything past this line at your own risk!#==============================================================================endclass Game_Battler < Game_BattlerBase  def die    if state?(MEOWREVIVE::STATE_ID)      @hp = [mhp * MEOWREVIVE::HEAL_PERCENT / 100, 1].max      @animation_id = MEOWREVIVE::ANIMATION_ID    else      @hp = 0    end    clear_states    clear_buffs  endend
Dude, thanks a lot! Couldn't find a script for it anywere, but it seems the RPG Maker community is a massive bunch of good guys and gals! I appreciate your help, and credit will be given! (Even though it's just a small practice game I'm making for my friends.)

Might use it in future works though, but all credit goes to you!
You are welcome, updated the script to add compatibility. You can now choose to disable/enable states clear for the revive state.
You are welcome, updated the script to add compatibility. You can now choose to disable/enable states clear for the revive state.
Not to be demanding or anything, but would it be possible to trigger the autorevive by using a spell/skill?
yes, simply add that state to skill/item just like you normally will add a state to skill/item.
yes, simply add that state to skill/item just like you normally will add a state to skill/item.
Works just like I wanted it to, thanks a lot!
You're welcome!

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-a-skill.51589/