class Game_Actors
def each
@data.each {|d| yield d if d}
end
end
class Scene_Gameover
HOME_ID = 1 #The Map-ID of your home
HOME_X = 9 #X-Coordinate for Home-teleport
HOME_Y = 6 #Y-Coordinate for Home-teleport
HOME_DIR = 2 #Direction for Home-teleport
def update
# If C button was pressed
if Input.trigger?(Input::C)
#heal party
$game_actors.each {|actor| actor.recover_all}
$game_temp.gameover = false
#teleport home
$game_map.setup(HOME_ID)
$game_player.moveto(HOME_X, HOME_Y)
case HOME_DIR
when 2 then $game_player.turn_down
when 4 then $game_player.turn_left
when 6 then $game_player.turn_right
when 8 then $game_player.turn_up
end
$scene = Scene_Map.new
end
end
end