This is a very simple script. To explain, that is. When the player pushes a certain button (let's say R), the turn ends immediately and the party attempts to flee from the battle.
Button to end battle
RGSS3 Script RequestsIf you read this and think it's too complicated, I'd appreciate details on why. Thank you in advance.
Bump.
Bump bump oh yeah bump it all up baby.
I think the issue is why is it needed? The escape button that is there by default does this already. So why is that not enough? What is this doing that the escape button isn't? Maybe clarify that, as that may help gather interest in someone taking this request.
Well, I've run multiple times into an issue in my game.
In this game, you don't destroy 200 hordes of meaningless enemies every half hour. Instead, you take a very careful approach to every single battle, try different things to see what works best, and eventually defeat. You will die multiple times against each enemy, but this is not defeat, it's part of the process of winning. Accordingly, dying has no consequence other than restarting the fight. Accordingly, too, if the player realises what he's doing isn't going to work, I let him escape with no consequences.
Some enemies will inflict sleep on the player party every turn. Every time they wake up, they will be attacked by the enemy again and fall asleep. This means that once the enemy attacks, the player will be unable to do anything. In other words, they've lost the battle. This is done to teach the player that some enemies must be dealt with instantly or they will screw you up for good.
The problem is, if there are no damaging enemies on the battle, the player won't die or win. They'll be stuck in an endless loop of falling asleep until the enemies run out of Mana. And as fun as that is to watch, it would be really nice to let them escape once they are in that position. I've tried eventing this through multiple ways, but nothing seems to work. So if someone can help, I would be extremely grateful.
In this game, you don't destroy 200 hordes of meaningless enemies every half hour. Instead, you take a very careful approach to every single battle, try different things to see what works best, and eventually defeat. You will die multiple times against each enemy, but this is not defeat, it's part of the process of winning. Accordingly, dying has no consequence other than restarting the fight. Accordingly, too, if the player realises what he's doing isn't going to work, I let him escape with no consequences.
Some enemies will inflict sleep on the player party every turn. Every time they wake up, they will be attacked by the enemy again and fall asleep. This means that once the enemy attacks, the player will be unable to do anything. In other words, they've lost the battle. This is done to teach the player that some enemies must be dealt with instantly or they will screw you up for good.
The problem is, if there are no damaging enemies on the battle, the player won't die or win. They'll be stuck in an endless loop of falling asleep until the enemies run out of Mana. And as fun as that is to watch, it would be really nice to let them escape once they are in that position. I've tried eventing this through multiple ways, but nothing seems to work. So if someone can help, I would be extremely grateful.
Once you pump you can't stop.
Reminder.
So the player presses a button and the party attempts to flee? Not successfully flee automatically?
Idk if you still need this desperately, but here you go
Code:
#==============================================================================
# TheoAllen - Force Abort Battle
# Version : -
#------------------------------------------------------------------------------
# You press a button, you escaped on next turn
#==============================================================================
Abort_Input = :F6
class Scene_Battle
alias theo_abort_battle_start start
def start
theo_abort_battle_start
@aborting = false
end
alias theo_abort_battle_start_party start_party_command_selection
def start_party_command_selection
if @aborting
BattleManager.process_abort
return
end
theo_abort_battle_start_party
end
alias theo_abort_battle_update_wait update_for_wait
def update_for_wait
@aborting = true if Input.trigger?(Abort_Input)
theo_abort_battle_update_wait
end
end
All attempts to flee are successfull in my game, so it's the same thing. Whatever's easier to do.
It worked perfectly! Thank you so much.
Original thread: https://forums.rpgmakerweb.com/threads/button-to-end-battle.84290/