escape script look please

● ARCHIVED · READ-ONLY
Started by jonathan7ben 6 posts View original ↗
  1. could someone create a script that makes it so when you escape you take 5% of your players hp as damage.

    thanks.
  2. What if the player only has less than 5%? Do they die?


    Is this for all players in the party?


    5% of max health, or 5% of the health they're currently at?
  3. 5% of there max health and if they die they get moved somewhere.
  4. "somewhere" is not much for a scripter to go on.

    Are you using random battles or evented?

    Find this method in BattleManager:

    Code:
      def self.process_escape    $game_message.add(sprintf(Vocab::EscapeStart, $game_party.name))    success = @preemptive ? true : (rand < @escape_ratio)    Sound.play_escape    if success      process_abort    else      @escape_ratio += 0.1      $game_message.add('\.' + Vocab::EscapeFailure)      $game_party.clear_actions    end    wait_for_message    return success  end
    and insert the following line just after if success:
    Code:
      def self.process_escape    $game_message.add(sprintf(Vocab::EscapeStart, $game_party.name))    success = @preemptive ? true : (rand < @escape_ratio)    Sound.play_escape    if success      $game_party.members.each {|member| member.hp -= [member.hp, (member.mhp * 0.05).to_i].min } # <<< insert this line      process_abort    else      @escape_ratio += 0.1      $game_message.add('\.' + Vocab::EscapeFailure)      $game_party.clear_actions    end    wait_for_message    return success  end
    This will give you your 'all members lose 5% of hp when escaping' but does not do anything if all party members are dead. But there are other scripts around already that will let you do something else except game over when all members are dead.
  5. sorry about the being vague, did not know how to describe it.
  6. Did you try the above? Did it do what you were after? Do you need something else, or is this resolved?