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,311
Reaction score
7,646
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,311
Reaction score
7,646
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,827
Reaction score
5,221
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

BRIEF HISTORY OF MY GAME SO FAR
June 2019 - My friend (let's call him G) says he wants to make a game
later- it's really bad and angsty
laterer - He gives up

EARLY 2020 - I suggest trying again, G says yes
slightly later - G gives up and gives me the whole idea
LATE 2020 - I finish the script's first draft. G doesn't like it

And that's where we stand!
To get validation for all your hard work feels amazing.

Studio Blue did a video on Collector and enjoyed it a lot. I expected them to rip it to shreds, but the gameplay went (mostly) well.

There are things I can improve, but they said my game "oozes Mike Pondsmith" (he's the creator of the Cyberpunk 2020 ttrpg, which precedes Cyberpunk 2077). I was shocked to hear such a compliment! :kaopride:
People3_3 and People3_4 added!

does there exist a word for a state of being that is between "living" and (not "dead", but ...) "not living" .... does that make sense, or do I just sound like Im high for something :[ ?

Forum statistics

Threads
105,747
Messages
1,016,111
Members
137,431
Latest member
weissblueter
Top