Quanee

Veteran
Veteran
Joined
Sep 14, 2017
Messages
63
Reaction score
8
First Language
Polish
Primarily Uses
RMMV
Hi,

I've been look around for a solution to my issue, yet I can't find any.

I'm trying to make only one, simple item menu for my character, which can be open and closed with the same exact key. So far I've got this:

1. I've created a parallel event
2. Changed menu access to disabled (I don't want player to have access to anything but that one menu)
3. Created a common event with conditional branch like so:

if Input.isTriggered('Space');
then SceneManager.push(Scene_Item);

Which pops the menu in question, and that's great, but now I'd like to close it with the same key (spacebar in this case). I've already tried playing around with SceneManager.push/goto(Scene_Map); but nothing will work. Any help would be greatly appreciated, thank you.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,672
Reaction score
15,291
First Language
English
Primarily Uses
RMMV
Window_Selectable.prototype.isCancelTriggered is the function that handles closing the window.

Maybe change that to use Input.isTriggered('Space'); instead, or it might be safer to add a Window_ItemList version that looks for the space key, keeping in mind that changing the default will also affect the title screen, battle windows, choice boxes, basically any window that allows a selection of something that's not part of the menu system.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,220
Reaction score
1,717
First Language
Portuguese - Br
Primarily Uses
RMMZ
I try to do something similar. If you dont mind using plugin you can use yanfly keyboard config.
 

Quanee

Veteran
Veteran
Joined
Sep 14, 2017
Messages
63
Reaction score
8
First Language
Polish
Primarily Uses
RMMV
@Shaz I'm honestly clueless on how to get that working. I've tried tweaking a bit, but now space doesn't even work and window comes up whenever I close it.

@Eliaquim Yanfly's plugin only allows me to bind keys in-game (as a player). I need them to be already set in motion before the game even starts.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,672
Reaction score
15,291
First Language
English
Primarily Uses
RMMV
Show what you've done. Scripts.
 

Quanee

Veteran
Veteran
Joined
Sep 14, 2017
Messages
63
Reaction score
8
First Language
Polish
Primarily Uses
RMMV
@Shaz Sorry, just before going to bed I've pretty much cleared all of it as it was useless, can't even remember what it was exactly. My scripting knowledge is limited to copy-paste code lines and hoping it works >.>
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,220
Reaction score
1,717
First Language
Portuguese - Br
Primarily Uses
RMMZ
@Shaz I'm honestly clueless on how to get that working. I've tried tweaking a bit, but now space doesn't even work and window comes up whenever I close it.

@Eliaquim Yanfly's plugin only allows me to bind keys in-game (as a player). I need them to be already set in motion before the game even starts.

You can do that.
Open the game with the plugin YEP_KeyboardConfig.js turned on.
Put it in a event script call SceneManager.push(Scene_KeyConfig);
You will open the Keyboard config scene.
Then you will see something like this:
XRiDxFI.png

Choose the configuration you want pressing with mouse or OK button then will see that:
tzxXMTn.png

As you can see there are a way to you to assign to a KEY only the CANCEL button.

Now, for this happen:
I need them to be already set in motion before the game even starts.

Exit this scene, save the game and close the game test.
Go to the directory of your project inside the "save" folder and you will see a file named "config.rpgsave".
It contains the configuration you have made.
You can delete all save files except this one. Start a new game and you will see that your setup will have remained.
If you do a deployment, you just have to copy this file and put it in the save folder and distribute the game already with that file.
The only thing you have to worry about is that the player does not change this setting within the game.
 

Latest Threads

Latest Posts

Latest Profile Posts

Finally got my new Discord Server up & Running! I'm still improving it as much as I can, & I'm open for any Suggestions!
I've been busy trying out different art styles for my game.

Enemies deserve some spotlight also
hackingCompressed.gif
I think I can make a text-based mini-game with almost zero art assets and with code only...just a lot of code as assets all by themselves. :kaojoy:
A video update on the progress I've been making on the cutscenes. :kaosalute:

Forum statistics

Threads
115,873
Messages
1,093,633
Members
151,111
Latest member
Ziffle
Top