Chaos Project

RPG Maker => Event Systems => Event System Requests => Topic started by: RoseSkye on March 27, 2009, 04:53:21 pm

Title: Halp :( [RESOLVED]
Post by: RoseSkye on March 27, 2009, 04:53:21 pm
Anyone know a way to revive a character at a low health percentage (possible 1) from an event? (Keep in mind that I'm not using the RTP battle system so the release after battle thing wont work)
Title: Re: Halp :(
Post by: GAX on March 27, 2009, 04:56:44 pm
Common event, just make it remove the "Defeated" status, this should work.

If not, I'll screw around with the event system later and see what I can do.
Title: Re: Halp :(
Post by: fugibo on March 27, 2009, 04:57:33 pm
Small script should do it :/


$game_party.actors[<id>].hp = $game_party.actors[<id>].max_hp * (<percent>/100) if $game_party.actors[<id>].dead


Note: I have NO idea if this will work.
Title: Re: Halp :(
Post by: RoseSkye on March 27, 2009, 05:02:56 pm
Didn't work :/
------------------

-.- Why didn't I try removing knockout before. Thanks GAX
Title: Re: Halp :(
Post by: fugibo on March 27, 2009, 05:40:41 pm
WAIT


module Kernel
  def revive_actors_wcw
    $game_party.actors.each do |actor|
      actor.hp = (actor.max_hp * <percent_in_decimal>) if ! actor.alive?
    end
  end
end


And call this in event:

revive_actors_wcw


I know that this is useless now, but I had to do it for posterity :P
Title: Re: Halp :(
Post by: Zylos on March 27, 2009, 07:50:31 pm
Little late, but yeah, a common event would be easiest for this. Just check if any of the characters = KO and then set their health to one while removing the status (along with any other status they might have had, if KO didn't do so already). Be careful how you run the event though; you don't want to have the common event running during a battle, because it'd then be impossible to lose then unless everyone was killed at once.
Title: Re: Halp :(
Post by: Blizzard on March 28, 2009, 06:49:07 am
WcW, it's "dead?", not "dead". xD