Chaos Project

RPG Maker => General Discussion => Troubleshooting / Help => Topic started by: ojp2010 on August 30, 2010, 05:07:11 pm

Title: End Scene call with direct hotkey [resolved]
Post by: ojp2010 on August 30, 2010, 05:07:11 pm
I am using a Mouse Map Menu script to call scenes from the map with direct hotkeys, however, I can't close the scenes and return to the Map_Scene. I know that I will need to edit the Scene scripts to be able to close with direct hotkeys. Can anyone point me in the right direction in and where in the script I should edit that in? I don't want to play around with RMX default scripts without knowing exactly what and where I need to edit and change. Thank you for any help.  
Title: Re: End Scene call with direct hotkey
Post by: cyclope on August 30, 2010, 06:59:23 pm
look in the scenes where it says Scene_Menu and change it to Scene_Map. exammple: in Scene_Equip in line 148 it says this
          $scene = Scene_Menu.new(2)
change it to
          $scene = Scene_Map.new
Title: Re: End Scene call with direct hotkey
Post by: ojp2010 on August 30, 2010, 08:57:28 pm
Quote from: cyclope on August 30, 2010, 06:59:23 pm
look in the scenes where it says Scene_Menu and change it to Scene_Map. exammple: in Scene_Equip in line 148 it says this
          $scene = Scene_Menu.new(2)
change it to
          $scene = Scene_Map.new



I did that, I am sorry I don't believe my explanation was clear. I want to be able to close the scene with a direct hotkey like a player has Scene_Item open and hit 'I' and the scene closes and returns them to the scene_map. Sorry that I wasn't to clear before.
Title: Re: End Scene call with direct hotkey
Post by: Wizered67 on August 30, 2010, 09:00:35 pm
look for the line
if Input.trigger?(Input::B)

in Scene_Item and change it to
if Input.trigger?(Input::Key['I'])


That should do the trick.
Title: Re: End Scene call with direct hotkey
Post by: ojp2010 on August 30, 2010, 10:24:08 pm
Quote from: Wizered67 on August 30, 2010, 09:00:35 pm
look for the line
if Input.trigger?(Input::B)

in Scene_Item and change it to
if Input.trigger?(Input::Key['I'])


That should do the trick.


I am getting an error when I do that, although the screen does flash to the Scene for like 1 second before bugging out. I am using Mouse Map Menu Script, which has a direct hotkey call scene ability which I am using to call the scenes, but it doesn't close them.

Spoiler: ShowHide
(http://img121.imageshack.us/img121/3680/51930288.png)

Title: Re: End Scene call with direct hotkey
Post by: Wizered67 on August 30, 2010, 10:38:51 pm
Did you use the exact line I posted and NOT Input.trigger?(Input::I)? (You have to put the Key['I'])
Title: Re: End Scene call with direct hotkey
Post by: ojp2010 on August 30, 2010, 11:45:44 pm
Quote from: Wizered67 on August 30, 2010, 10:38:51 pm
Did you use the exact line I posted and NOT Input.trigger?(Input::I)? (You have to put the Key['I'])


I did:(

Spoiler: ShowHide
Quoteend
  #--------------------------------------------------------------------------
  # * Frame Update (when item window is active)
  #--------------------------------------------------------------------------
  def update_item
    # If B button was pressed
    if Input.trigger?(Input::['I'])
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to menu screen
      $scene = Scene_Map.new
      return
    end


Spoiler: ShowHide
(http://img121.imageshack.us/img121/3680/51930288.png)


Title: Re: End Scene call with direct hotkey
Post by: Wizered67 on August 31, 2010, 12:03:45 am
Your forgetting the Key infront of it. It shoudl be Input.trigger?(Input::Key['I'])
Title: Re: End Scene call with direct hotkey
Post by: ojp2010 on August 31, 2010, 12:46:00 am
Quote from: Wizered67 on August 31, 2010, 12:03:45 am
Your forgetting the Key infront of it. It shoudl be Input.trigger?(Input::Key['I'])


fu(k m3 :/ thanks. O.o