Script Request- Dealing with Death State

● ARCHIVED · READ-ONLY
Started by Rylan Silverfox 1 posts View original ↗
  1. I know the title is pretty vauge...  I will explain in detail what I am going for in just a moment.

    First, I want to say that I am continuing to learn more and more about RPG Maker Ace every day and I am actually learning how to edit some of the scripting myself.  Second, I want to say thanks to Pacman, Shad3Light, Selchar, Hime, and V.M of D.T for some pretty amazing scripts (not made specifically for me) that have enabled me to do some pretty amazing things!  If it wasn't for them, I don't know how long it would have taken me to learn to do it on my own.

    Now, on to my request.  I am currently building how my game responds to an actor death in battle. 

    1) I am trying to set the rate for revival at a priest to be variable depending upon MHP (I am thinking something simple like 25% of MHP in gold).

    2) When an actor dies, I want their sprite to change to a coffin and move to the end of the party.  This will of course only last until they are revived, at which time they would move back to their place in the lineup.  A simple parallel process makes the sprite change automatically, but I can't get the coffin to move to the back.

    3) And finally, the 3rd part, I need for the current TP to be drained from the player as well.  Basically, I need something like:

    class Game_Interpreter
      def party_drain_tp
        $game_party.members.each do |m|
          m.tp *=(m.mtp * 0).to_i
        end
      end
    end


    But instead just need it to call for the inflicted party member.

    Here is what I have so far, so if you want to help me, you know where I am coming from:

    Common Event: Death

    @>Conditional Branch: [bob] is [Death] inflicted

       @>Change Actor Graphic: [bob}, '$Coffin', 0, 'Actor 4', 0

       @>Control Switches: [008: P[1] Dead] = ON

      :  Else

       @>

    :  Branch End

    (This is just a snippet of the common event that runs as a parallel process for all 4 actors)

    The 3rd line actually controls how the Inn process the Recover All: Entire Party command through the use of a conditional branch if the switch is on.  It might not be the easiest way, but it works well :)

    Thanks!

    Edit:

    So, I found this comment in another forum and it works beautifully for one of the issues

    Posted 14 February 2013 - 08:44 PM

    ...

    "If Hero -> Status -> Dead" Remove from Party

    and right after this "Insert into Party"

    I'm really surprised I didn't think about that.

    But I could still use some help on the other two areas :)

    Edit:

    And through persistance, I figured out how to do what I needed with a control variable in part 1...

    Still looking for some guidance on part 3...

    Edit:

    Found the class that I needed to call to get part 3 to happen...  I would like to thank the 20+ people who viewed this post and offered no advise what so ever.  Because of you, I figured some more things out for myself and you helped me remember why I don't post in the forums here more often.  Kudos!