- Joined
- Aug 25, 2016
- Messages
- 268
- Reaction score
- 148
- First Language
- English
- Primarily Uses
- RMMV
*EDIT* I figured it out. Found a script online that you can force a battle to end via an event page. Wanted to share in case anyone else searches for something similar:
This will force the loss and display the battle loss message:
BattleManager.processDefeat();
This will display no battle loss message:
BattleManager.playDefeatMe();
if (BattleManager._canLose) {
BattleManager.replayBgmAndBgs();
} else {
' AudioManager.stopBgm();
}
BattleManager.endBattle(2);
This is for RPG Maker MV.
I'm trying to figure out how to do this. So, in my game you get an auto-battle companion. You can't control them, and they're in a back row using Yanfly's Row Formation. I have it so they help in battle (apply states, heal, etc). However; they can't be attacked by the enemy, damaged, or die. What I want to happen in battle is when the player dies... the encounter ends. This doesn't happen because the system still sees your companion alive.
I fixed this by setting an event page within the battle that checks every turn if the player has the death state applied. If they do, it "aborts" battle. That part works great. Problem is aborting the battle doesn't actually count as the player losing, and the encounter event chases the player right away and triggers another battle to start.
Is there a script or way to force the battle to end when the player dies, but also have it count as a loss so the "If Lose" battle branch kicks in?
This will force the loss and display the battle loss message:
BattleManager.processDefeat();
This will display no battle loss message:
BattleManager.playDefeatMe();
if (BattleManager._canLose) {
BattleManager.replayBgmAndBgs();
} else {
' AudioManager.stopBgm();
}
BattleManager.endBattle(2);
This is for RPG Maker MV.
I'm trying to figure out how to do this. So, in my game you get an auto-battle companion. You can't control them, and they're in a back row using Yanfly's Row Formation. I have it so they help in battle (apply states, heal, etc). However; they can't be attacked by the enemy, damaged, or die. What I want to happen in battle is when the player dies... the encounter ends. This doesn't happen because the system still sees your companion alive.
I fixed this by setting an event page within the battle that checks every turn if the player has the death state applied. If they do, it "aborts" battle. That part works great. Problem is aborting the battle doesn't actually count as the player losing, and the encounter event chases the player right away and triggers another battle to start.
Is there a script or way to force the battle to end when the player dies, but also have it count as a loss so the "If Lose" battle branch kicks in?
Last edited: