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.

Menu Help

Hello!

I'm using $scene = Scene_Skill.new(0) in an event to call the Skill menu, but when I exit out of it I end up getting the main menu again. Is there a way to avoid getting the main menu when calling individual menus?

Thanks in advance! XD
 
Go to scene_skill and find
Code:
#--------------------------------------------------------------------------

  # * Frame Update (if skill window is active)

  #--------------------------------------------------------------------------

  def update_skill

    # If B button was pressed

    if Input.trigger?(Input::B)

      # Play cancel SE

      $game_system.se_play($data_system.cancel_se)

      # Switch to menu screen

      $scene = Scene_Menu.new(1)

      return

 
replace Scene_Menu with Scene_map like JBrist said
Note this is the menu one so I'd suggest making a seperate Scene_Skill_Event for your event calls
 
Thank you - it works, but I'd like to know to switch it on and off using a game switch or game variable.

Depending on what map I'm on, I'd like to go to either the map or the main menu from the skill menu.

*Edit: Thanks guys for your help - I think I got it figured out.

Code:
def update_skill

if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN) 

@help_window.y = 500  

end

if $game_variables[499] == 0

if Input.trigger?(Input::B)

$game_system.se_play($data_system.cancel_se)

$scene = Scene_Menu.new(1)

return

end

end

if $game_variables[499] == 1

if Input.trigger?(Input::B)

$game_system.se_play($data_system.cancel_se)

$scene = Scene_Map.new

return

end

end
 
ys, but you also could make it easier ;)
make it that way :
Code:
def update_skill

if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)

@help_window.y = 500  

end

if Input.trigger?(Input::B)

$game_system.se_play($data_system.cancel_se)

if $game_variables[499] == 0

$scene = Scene_Menu.new(1)

else

$scene = Scene_Map.new

return

end

end
 

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