[spoiler=Script]class Scene_Battle
# Aliases update to run before everything else in the method
alias gameover_to_common_event update
def update
if $game_temp.gameover
# Editable region. This number below is the ID of the common event you
# wish to run. It is 1 by default, change it to suit your game.
$game_temp.common_event_id = 11
$scene = Scene_Map.new
$game_temp.gameover = false
return
end
gameover_to_common_event
end
end[/spoiler]
So here's the problem... It only goes to the common event game over if the character is knocked out during battle. Unfortunately, I'm using this for a trap system. So the only time characters are damaged and have the chance of being knocked out is on the map, not in battle.
So, my question is... Is there any way to edit this in a way so that it will trigger the common event game over on the map instead of during battle?
Any help is appreciated.