long term goal: based on certain stats like karma, when you die, you go to one of many other planes of existence
short term goal: when you die, you go to a different map.
The command menu just gives you the option of normal Game Over or Shutdown. That part works fine... but,
I don't know VX well enough to see where my mistakes can be corrected by comparing Zylos' working version.
I think my real problem lies in the differences between my GhostWorld Class and Scene_Title Class
here's the relevant section that's different in Scene Title:
def command_new_game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Stop BGM
Audio.bgm_stop
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each type of game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Set up initial party
$game_party.setup_starting_members
# Set up initial map position
$game_map.setup($data_system.start_map_id)
# Move player to initial position
$game_player.moveto($data_system.start_x, $data_system.start_y)
# Refresh player
$game_player.refresh
# Run automatic change for BGM and BGS set with map
$game_map.autoplay
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
and here's my version for Ghostworld:
def command_continue
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to load screen
@command_window.dispose
# Cancel Gameover
$game_temp.gameover = false
$game_actors[2].immortal = true
$game_actors[2].hp += 1
$game_actors[3].immortal = true
# Stop BGM and BGS
$game_system.bgm_play(nil)
$game_system.bgs_play(nil)
# go to Astral Plane
$scene = Scene_Map.new
#tried these, but didn't work:
#$game_map.setup($game_map.map_id)
#$game_map.update
#$game_party.refresh
$game_temp.player_transferring = true #glitchy noise maker
$game_temp.player_new_map_id = 4
$game_temp.player_new_x = 6
$game_temp.player_new_y = 6
$game_temp.player_new_direction = 0
end
I'm guessing the part I'm missing is one or more of these:
$game_map.setup($data_system.start_map_id)
$game_player.moveto($data_system.start_x, $data_system.start_y)
$game_player.refresh
$game_map.autoplay
$game_map.update
but I'm not sure. Basically I'm trying to "load game" from the Command menu screen, which is really just a fancy form of these
$game_temp.player_transferring = true #glitchy noise maker
$game_temp.player_new_map_id = 4
$game_temp.player_new_x = 6
$game_temp.player_new_y = 6
$game_temp.player_new_direction = 0
plus the following effects:
1. deactivate "game over" ($game_temp.gameover = false)
2. change stats to reflect being dead (for now that's just resetting to 1 hp)
it's getting them to travel to the new map after all the Scene Swapping that's messing up.