I am trying to find a way to have a comment event simulate pressing buttons. I am using VS Picture COmmen Event plugin and working towards a gamepad style layout and have some events that require specific buttons and wanted to mimic it with pictures.
Simulate Button Press.
RPG Maker MZ SupportI recently make a Evented Dance for MV (no tutorial) but it might have similair
thing setup I think which require an autorun event and parallel common event
that shows the image.
if you want to "click the image" than it require a different setup.
but I dont know if you need to click it or press the button of the image showed.
and what wil happen than.
would be this kind of "Quick Time Event"? or something different if you can
explain a bit more?
thing setup I think which require an autorun event and parallel common event
that shows the image.
if you want to "click the image" than it require a different setup.
but I dont know if you need to click it or press the button of the image showed.
and what wil happen than.
would be this kind of "Quick Time Event"? or something different if you can
explain a bit more?
MZ has a method specifically for that. Try something like this in a Script command:
Replace
JavaScript:
Input.virtualClick('ok');
ok with the name of the input you want to simulate. For reference, here's the default keyboard control map (rmmz_core.js):
JavaScript:
Input.keyMapper = {
9: "tab", // tab
13: "ok", // enter
16: "shift", // shift
17: "control", // control
18: "control", // alt
27: "escape", // escape
32: "ok", // space
33: "pageup", // pageup
34: "pagedown", // pagedown
37: "left", // left arrow
38: "up", // up arrow
39: "right", // right arrow
40: "down", // down arrow
45: "escape", // insert
81: "pageup", // Q
87: "pagedown", // W
88: "escape", // X
90: "ok", // Z
96: "escape", // numpad 0
98: "down", // numpad 2
100: "left", // numpad 4
102: "right", // numpad 6
104: "up", // numpad 8
120: "debug" // F9
};
That is exactly what I needed. Thank you
Original thread: https://forums.rpgmakerweb.com/threads/simulate-button-press.136712/