Picture Button to call a common event?

Hey yall, I have a custom menu set up based on picture-based menu using SceneManager.push(Scene_Save/Load, etc). I would like to set up another picture button that when pressed "ok/enter" with the keyboard, calls a common event where I have another custom picture-based menu set up. I was able to find a plugin where it calls common event when clicked, but not when pressed with a keyboard.

I hope I'm clear with the question. Is there a plugin or a javascript code that calls a common event when a picture button (not keyboard buttons) is pressed? Thanks!
I'm confused about what you're after: the first paragraph makes it sound like you want something that responds to pressing a keyboard key, but then your second says you want a plugin that calls a CE when you press a picture button, which would imply a click.
So, if I understand correctly, you have a picture menu where you move selection with up/down and want a script to launch a common event when your selection is on a certain spot? It's:

$gameMap._interpreter.command117([Id]);

(Id is your common event id.)
OP probably wants to do something like this, in which case it depends on what listening mechanic is being used to determine which picture the cursor is on
OP probably wants to do something like this, in which case it depends on what listening mechanic is being used to determine which picture the cursor is on
I'm confused about what you're after: the first paragraph makes it sound like you want something that responds to pressing a keyboard key, but then your second says you want a plugin that calls a CE when you press a picture button, which would imply a click.
So, if I understand correctly, you have a picture menu where you move selection with up/down and want a script to launch a common event when your selection is on a certain spot? It's:

$gameMap._interpreter.command117([Id]);

(Id is your common event id.)
@AquaEcho Yes, that is exactly the tutorial I followed and achieved. I should've added that on my post.
@Trihan Sorry I wasn't clear but I do mean a plugin/script that calls a common event when a picture button is pressed but not with a click. Like the tutorial I followed that AquaEcho mentioned, I want one of the buttons to launch a common event instead when selected.
@rpgLord69 Exactly. I have a picture menu that I can navigate with my arrow keys on the keyboard, and when one of the buttons is selected, I would like it to call a common event.
@AquaEcho Yes, that is exactly the tutorial I followed and achieved. I should've added that on my post.
@Trihan Sorry I wasn't clear but I do mean a plugin/script that calls a common event when a picture button is pressed but not with a click. Like the tutorial I followed that AquaEcho mentioned, I want one of the buttons to launch a common event instead when selected.
@rpgLord69 Exactly. I have a picture menu that I can navigate with my arrow keys on the keyboard, and when one of the buttons is selected, I would like it to call a common event.
Then under the If Button [ok] is being triggered, you would put Common Event or
$gameTemp.reserveCommonEvent(ID)
So, if I understand correctly, you have a picture menu where you move selection with up/down and want a script to launch a common event when your selection is on a certain spot? It's:

$gameMap._interpreter.command117([Id]);

(Id is your common event id.)
RPGMZ_2023-12-17_07-23-17.png

I inserted the line of code as shown above but when the button is selected, it didn't do anything.
I wanted it to show the below common event.
RPGMZ_2023-12-17_07-27-18.png
View attachment 288339
I inserted the line of code as shown above but when the button is selected, it didn't do anything.
I wanted it to show the below common event.
View attachment 288341
It would be $gameMap._interpreter.command117(4);

but if you're doing it in an event, why not just use the "call common event" event command?
Then under the If Button [ok] is being triggered, you would put Common Event or
$gameTemp.reserveCommonEvent(ID)
This worked! Thanks so much!
It would be $gameMap._interpreter.command117(4);

but if you're doing it in an event, why not just use the "call common event" event command?
Oh shizzzzzzzz because I'm a damn fool! I completely forgot I could just use the event command! jesus! Putting that aside though! $gameTemp.reserveCommonEvent(ID) from AquaEcho worked but the one you gave me still didn't work (after I replaced the brackets [4] to a (4) Was that not the issue?Sorry I'm a huge noob.
This worked! Thanks so much!

Oh shizzzzzzzz because I'm a damn fool! I completely forgot I could just use the event command! jesus! Putting that aside though! $gameTemp.reserveCommonEvent(ID) from AquaEcho worked but the one you gave me still didn't work (after I replaced the brackets [4] to a (4) Was that not the issue?Sorry I'm a huge noob.
Oh, I was actually incorrect. I was thinking of reserveCommonEvent; the interpreter command functions do require their parameters to be in an array.
Oh, I was actually incorrect. I was thinking of reserveCommonEvent; the interpreter command functions do require their parameters to be in an array.
So would I be able to use that instead if I were to call multiple common events?
So would I be able to use that instead if I were to call multiple common events?
I would just stick with using reserveCommonEvent if that's doing the trick for you.
That's what I'll do. Thanks a lot! Solved

Original thread: https://forums.rpgmakerweb.com/threads/picture-button-to-call-a-common-event.163920/