[RMXP][SCRIPTING]CONTINUE AFTER GAME OVER?
Posts
Pages:
1
Need a bit of help with this one.
So one time I tried to set it such that after pressing C in Scene_GameOver (or something like that), it will switch back to the map. However, it kept looping the game over screen and shows no sign of going to the map scene.
The only changes I have attempted as of now is changing the $scene to Scene_Map.new for the if Input.trigger?(C) (something like that, can't remember the exact code sorry), that which originally was supposed to go to Scene_Title. I've also tried to restore hp/sp for all party members (which may be probably kind of unnecessary since I set KO to be removed after battle). I may or may not have also tried to set the $game_temp.gameover (or something like that) to false, can't remember.
Is there anything else that I need to look into for the transition to work properly?
Or if there is an existing plug-in/script that I can look into?
Many thanks!
Edit:
Okay so later today I found that it only looped for game overs called by events. For battle-based game over though might need to reset everything by script event using the scripts in battle_end. Okay case closed.
So one time I tried to set it such that after pressing C in Scene_GameOver (or something like that), it will switch back to the map. However, it kept looping the game over screen and shows no sign of going to the map scene.
The only changes I have attempted as of now is changing the $scene to Scene_Map.new for the if Input.trigger?(C) (something like that, can't remember the exact code sorry), that which originally was supposed to go to Scene_Title. I've also tried to restore hp/sp for all party members (which may be probably kind of unnecessary since I set KO to be removed after battle). I may or may not have also tried to set the $game_temp.gameover (or something like that) to false, can't remember.
Is there anything else that I need to look into for the transition to work properly?
Or if there is an existing plug-in/script that I can look into?
Many thanks!
Edit:
Okay so later today I found that it only looped for game overs called by events. For battle-based game over though might need to reset everything by script event using the scripts in battle_end. Okay case closed.
Well, it's also possible to save the same $game_party data BEFORE your enter the battle. In case the team loses, you would just retrieve everything from the temporary variables you would have created, i.e. $game_temp_party.
Script Call to Use Before Battle
$game_temp_actors = Game_TempActors.new
Script Call to Use After Losing the Battle
$game_party.reset_data
class Game_TempActors
attr_reader :actors, :items, :weapons, :armors
def initialize
@actors = $game_party.actors.clone
@items = $game_party.items.clone
@weapons = $game_party.weapons.clone
@armors = $game_party.armors.clone
end
end
class Game_Party
def reset_data
@actors = $game_temp_actors.actors.clone
@items = $game_temp_actors.items.clone
@weapons = $game_temp_actors.weapons.clone
@armors = $game_temp_actors.armors.clone
$game_temp_actors = nil
end
end
Script Call to Use Before Battle
$game_temp_actors = Game_TempActors.new
Script Call to Use After Losing the Battle
$game_party.reset_data
Pages:
1














