could someone create a script that makes it so when you escape you take 5% of your players hp as damage.
thanks.
escape script look please
● ARCHIVED · READ-ONLY
-
-
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? -
5% of there max health and if they die they get moved somewhere.
-
"somewhere" is not much for a scripter to go on.
Are you using random battles or evented?
Find this method in BattleManager:
Code:and insert the following line just after if success: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
Code: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.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 -
sorry about the being vague, did not know how to describe it.
-
Did you try the above? Did it do what you were after? Do you need something else, or is this resolved?