How to detect key while menu is open

Dreamsavior

Villager
Member
Joined
Mar 31, 2016
Messages
12
Reaction score
62
First Language
Not English
Primarily Uses
RMMV
Hi everyone,

Sorry if this question has been asked before. I've been looking for an answer to this question and every solution to this question leads to a script that only detects the keyboard button in the map, not in the menu.

What I need is to detect the keyboard while the menu is open.

Please enlighten me on this.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,230
Reaction score
7,615
First Language
German
Primarily Uses
RMMV
what do you want to happen when the key is pressed?

and just to make sure we are on the same page, because you posted in the wrong forum in all cases:
scripting is not the same as eventing. Those two words have ver specific meanings in all RPG Makers.

On the map, keyboard presses can be detected by both eventing and scripting (scripting as in programm code, not as in sequences of event commands).
On the menu, events can't be processed at all.

Second problem: The scripting language is different depending on the maker, and it can't be used in the wrong maker. You posted in the forum for Ace, which would be for an evented solution in Ace. Ace uses RGSS3 as a script language however, and any change to the menu requires you to insert a full script with the script editor. And those question would belong under RGSS3 script requests, not here.

However your profile says that you're using MV, and MV uses javascript as a language. Any change to the menu in MV will require a plugin to be added, and that would go into the plugin request forum for MV.

So what exactly do you want? please report that to a moderator so that your topic can be moved after you added the missing info.
 

Dreamsavior

Villager
Member
Joined
Mar 31, 2016
Messages
12
Reaction score
62
First Language
Not English
Primarily Uses
RMMV
Hi Andar, Thank you for your quick response.
First of all, The thing I asked is for RPG Maker VX Ace. and by VX Ace, it is indeed RGSS3.

Why you might asked. Well I'm translator and a modder. I need a script that will trigger a ruby script (or common events) when you pressing certain key while you're on the menu. And yes, because my field of expertise is JavaScript and not Ruby... I really need a help here.

And lastly, Apologize if I'm in the wrong forum.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,230
Reaction score
7,615
First Language
German
Primarily Uses
RMMV
Doesn't work exactly that way.

The script you want to trigger needs to be rewritten in a way that it implements that key trigger for itself into the update method of the menu.

There is no game interpreter in the menu screen, that is why all item-based common events close the menu and return to the map to have their common event processed.
Because of that there is no way to check for any key from outside the menu, the check needs to be implemented into the menu code itself - and that can only be done by a full script.

And instead of murking up the code by having a script that adds a key check just to call another script, it's better to modify the script that is supposed to be called to provide its own key trigger on the screens.
The only exception to this is if you don't want to call a script but a default script function, in that case you would need an independent script.

If you only want to process a common event while in the menu itself, there are already scripts for that - either tsukihime's menu interpreter on himeworks or yanfly's common event menu.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,763
Reaction score
5,203
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.

 

Dreamsavior

Villager
Member
Joined
Mar 31, 2016
Messages
12
Reaction score
62
First Language
Not English
Primarily Uses
RMMV
Thank you zeroscares
That's exactly what I need.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

A friend requested me to do a pfp for his twitch channel, so far he approved one of my sketches, so going to digital now. The style he's looking for is quite different from my usual, hopefully I can get it right... :kaoback:
I am so hyped! A new post update and im anxious to see reactions..eeeeeeee
When a youtuber plays your project or game made by you using MAKERs, you will just be awe struck
Ok... so working on the official game guide for my game and its more than 150 pages...... wow. Well, I hope it will help a few players out.

Forum statistics

Threads
105,478
Messages
1,013,992
Members
137,115
Latest member
ArchaicStone565
Top