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,283
Reaction score
7,635
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,283
Reaction score
7,635
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,812
Reaction score
5,212
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

All of the auditions for our game are so good, I'm so glad I'm not in charge of choosing completely. lol I just can't with some of them. I listen to them on repeat. XD
Working on a Patch to integrate AlphaABS into random generated Dungeons. Was a bit tricky, but the outcome is a real Life Changer!!

Will release it the next days!
Been pretty busy... but I got a better headset for recording and listening today. Dad says that he'll consider taking me to Great Wolf Lodge for the first time once I finish summer classes (my final semester!) I'll be taking my plushie friends with me: Bendy, Lolbit, and Helen Henny. (I WUV PLUSHIES!)
SF_Monster3,4 added!


My only regret is the portal mirror effect is too subtle to show up in these GIFs. It probably just needs more sparkles. :LZSwink:

Forum statistics

Threads
105,650
Messages
1,015,287
Members
137,327
Latest member
Mezzy
Top