The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Zacpower4 on November 18, 2011, 04:50:44 AM

Title: Basic Script Calls[RESOLVED]
Post by: Zacpower4 on November 18, 2011, 04:50:44 AM
So, I've been trying to make an evented menu-system and I'm having problems with it. But first, here's how it works:

1. In the beggining of the game, menu access is disabled.

2. Player presses 'esc' button(Which does not pop up the default menu screen btw) which, through a parallel-processed event, transfers the player to a map which is the menu. (Please ignore the cursor in the bottom-left hand corner.)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1092.photobucket.com%2Falbums%2Fi403%2Fzacpower4%2FMenu-1.png&hash=42ae94f4c5c9f39a03a93df0fd41f6da3329d8cc)

3. The cursor at the 'items' icon is actually the player as a cursor sprite.

4. The player presses space/enter, and through a basic script call, the item screen pops-up.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1092.photobucket.com%2Falbums%2Fi403%2Fzacpower4%2FMenu-2.png&hash=fc7f5f2c4c246f2fc3e03fc5cb94fd65b7816170)

5. Now here's the issue. But when I press esc to go back to the menu (the map) it goes to the default menu screen although I turned off the menu access.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1092.photobucket.com%2Falbums%2Fi403%2Fzacpower4%2FMenu-3New.png&hash=2fb86db7a3e1724deb868e6bff5601c0889f9e2c)

Here's the map editor:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1092.photobucket.com%2Falbums%2Fi403%2Fzacpower4%2FMenu-4.png&hash=9571aef46581ad797e131e760fa6472c68c4a54b)

And here's the events:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1092.photobucket.com%2Falbums%2Fi403%2Fzacpower4%2FMenu-5.png&hash=9f7076fc13097a103fb940567326bfcf1cec688c)
(Ignore the array of events on the top-left corner except for the lowest one(Not the cursor))

And one event that transfers the player back to the map:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1092.photobucket.com%2Falbums%2Fi403%2Fzacpower4%2FMenu-6.png&hash=8382128b3bc00ed8e245336effaa7cc051fdcff1)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1092.photobucket.com%2Falbums%2Fi403%2Fzacpower4%2FMenu-7.png&hash=10aeee6574580bb3bc571fdcbb6acf2b53a06d49)

I'm asking all the scripters out there, if there's any script call that only shows the item/skill/equip/status/exit screen, and doesn't go back to the default menu screen when you go back(Press esc).

---------------------------

Oh, and also if there's any script/script call that allows you to select which skill/equip/status screen of each character that you want to view:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1092.photobucket.com%2Falbums%2Fi403%2Fzacpower4%2FMenu-8.png&hash=f7e691165ac45b9b0e1492907efb8ae3d49a53a6)
(Eg. I want to go to 2nd character's status screen, but every time I do the scrip call it takes me to the main/1st character's status screen.)

---------------------------

Thanks for your time, any help would be greatly appreciated. If you have any doubts, please clarify!
Title: Re: Basic Script Calls
Post by: cozziekuns on November 18, 2011, 05:02:10 AM
Changing the return_scene definition in each of the scripts would probably work. For example, replacing Scene_Item's line 39:
$scene = Scene_Menu.new(0) with: $scene = Scene_Map.new
Title: Re: Basic Script Calls
Post by: pacdiggity on November 18, 2011, 05:39:53 AM
Eh, just paste this in materials just above main. You'll need to let us know if you use custom scenes, though.
pac_input_fix_scenes = ["Item", "Equip", "Status", "End", "Skill"]
pac_input_fix_scenes.each { |klass|
  pac_input_fix = %Q(class Scene_#{klass} < Scene_Base; def return_scene;
  $scene = Scene_Map.new; end; end); eval(pac_input_fix)
}
class Scene_File < Scene_Base
  def return_scene
    $scene = @from_title ? Scene_Title.new : Scene_Map.new
  end
end

That should well do it.
Title: Re: Basic Script Calls
Post by: Zacpower4 on November 18, 2011, 07:52:40 AM
Thank you so much! It works like a charm now.