Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Another question...

How do I get $scene variables to go not just scene_map, but to a specific map? because I'm having a bit of a problem with my map menu system where I go down options to Jukebox, and if I have it as an event that clicking to 'exit' goes back to the main screen, but if you hit ESC, bringing up your menu system, and hit end game, scroll down to 'title', then with my $scene = scene_map.new tag, it takes me back to the jukebox, since THAT's the new map according to the scripter...
 

Anonymous

Guest

Well, Ruby is case sensitive so anyway you should write $scene = Scene_Map.new for a start
Now if you just mispelled I would need more info (script?)
 
8-) nevermind, solved it...

In the menu, Scene_End, I changed the command_to_title to...

Code:
def command_to_title
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Fade out BGM, BGS, and ME
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    # Switch to title screen
    $game_map.setup(1)
    # Move player to initial position
    $game_player.moveto(2,7)
    # 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

to effectively force it to choose a specific map... This will definitely come in handy... hehehe...

You can now remove this topic, I'm learning by leaps and bounds here!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top