Hi all,
So right now I've been working with this snippet which is found in BattleManager Line 244:
As you can see, I commented out the first two lines to effectively remove the "Your party was defeated" line, which works. The issue is that I'm trying to make it so that @can_lose causes an "Exit Event Processing" command. This is because all of my battles take place inside events, so the first step to incorporating my custom gameover system is by exiting the event commands so that a reserved common event can be called (which transports the player to a "checkpoint" of sorts).
I'm still pretty foggy on how methods function as lists of commands (but unlike events), so I tried adding the following code:
This calls the method from Game_Interpreter which exits event processing. Doing so, however, gives me an "undefined method 'command_115' for nil:Class" error. I can only guess that's because this method is being called from within battle processing and not event processing, which is a whole can of worms I have no idea how to deal with.
So to summarize, the goal is to create a method that exits the event processing of the event which called the battle. If anyone has any ideas on how to do this, I would be more than grateful!
So right now I've been working with this snippet which is found in BattleManager Line 244:
Code:
def self.process_defeat
#$game_message.add(sprintf(Vocab::Defeat, $game_party.name))
#wait_for_message
if @can_lose
revive_battle_members
replay_bgm_and_bgs
SceneManager.return
else
SceneManager.goto(Scene_Gameover)
end
battle_end(2)
return true
end
As you can see, I commented out the first two lines to effectively remove the "Your party was defeated" line, which works. The issue is that I'm trying to make it so that @can_lose causes an "Exit Event Processing" command. This is because all of my battles take place inside events, so the first step to incorporating my custom gameover system is by exiting the event commands so that a reserved common event can be called (which transports the player to a "checkpoint" of sorts).
I'm still pretty foggy on how methods function as lists of commands (but unlike events), so I tried adding the following code:
Code:
$game_interpreter.command_115
This calls the method from Game_Interpreter which exits event processing. Doing so, however, gives me an "undefined method 'command_115' for nil:Class" error. I can only guess that's because this method is being called from within battle processing and not event processing, which is a whole can of worms I have no idea how to deal with.
So to summarize, the goal is to create a method that exits the event processing of the event which called the battle. If anyone has any ideas on how to do this, I would be more than grateful!