I want to tie Page Up and Page Down when going up and down in the scroll wheel. But I haven't find a way to do so. Does anyone know how to do this?
MV Tie buttons to scroll wheel?
JS Plugin RequestsFind this section in rpg_core.js
Save all that as a plugin, copy the highlighted lines and past them back in. The numbers on the left represent the actual input. The ‘text’ represents the in game function. Change the numbers on the left to the numbers that represent the mouse wheel up and down buttons.
You’ll have to look up what those are.
Edit: seeing as there are no mouse inputs in that list, I’m not certain that it will work for mouse buttons. You’ll have to experiment a bit or maybe someone more knowledgeable can say. If not then the solution should be somewhere else in rpg_core.js
Save all that as a plugin, copy the highlighted lines and past them back in. The numbers on the left represent the actual input. The ‘text’ represents the in game function. Change the numbers on the left to the numbers that represent the mouse wheel up and down buttons.
You’ll have to look up what those are.
Edit: seeing as there are no mouse inputs in that list, I’m not certain that it will work for mouse buttons. You’ll have to experiment a bit or maybe someone more knowledgeable can say. If not then the solution should be somewhere else in rpg_core.js
I thought that but doesn't seem to have keycodes for the mouse.
Or I'm just dumb and I can't find them. I'll take another look anyways, thanks!
You might have to do a bit of guessing and testing.
mousewheel is coded inside TouchInput (also in rpg_core.js)
Code:
TouchInput._onWheel = function(event) {
this._events.wheelX += event.deltaX;
this._events.wheelY += event.deltaY;
event.preventDefault();
};
Moved to: Plugin Requests
Nice. I’ll see if I can crack that when I have time.
Thank you! I tried to make it work but Im new at java script so I just couldn't do it.
Original thread: https://forums.rpgmakerweb.com/threads/tie-buttons-to-scroll-wheel.134394/