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.

Call the Inventory, and escape to map without seeing Menu

Hey all!

Im trying to setup a event in my game where when the main character receives an Item, it brings you directly to the Inventory Screen, and since I do not wish to use the built in menu that comes default in RPGXP, I would like to be able to escape the Inventory screen brining me directly to the current map I am on, skipping the menu altogether.



Right now I have a NPC that has the following event commands:

Text: Take this Potion.
Change Item [Potion], + 1
Script: @Scene_Item2 = Scene_Item2.new
          @Scene_item2.main

I just created a copy of the Scene_Item script that comes with RPGXP naming it Scene_Item2 for testing purposes.

The above code will bring me into the inventory screen after I talk to the NPC and receive the potion.

But when I use 'B' to cancel It always brings me back to the Menu.

Can anyone explain how I can skip the menu part of this so when I hit 'B' while in the inventory screen it will bring me back to the map im on?


-Dwayne
 
in scene Item make
def update_item
    # 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(0)

in to
def update_item
    # 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_map.new(0)


ok, im not a scripter at all, however I think this may be the solution to your problems.
 
first of all, instead of
Code:
Script: @Scene_Item2 = Scene_Item2.new
          @Scene_item2.main
you can do
Code:
$scene = Scene_Item2.new

don't have rmxp here, but that problem is certainly in the update method of Scene_Item. changing
Code:
$scene = Scene_Menu.new(0)
to
Code:
$scene = Scene_Map.new
should work. make sure you make this change in Scene_Item2 or whichever one you're transferring to.
 

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