Hi there,
I have a question... I wondered if I could use the right mouse button another way...
I wanted it to simulate the alt key, because I use Galv's simple crops and tools and wanted the tools (alt) to be usable with the right mouse button, too. In the keymap in rpg.core there is the alt button defined with 18.
A click with the RMB is TouchInput.isCancelled in line 3061...
Spoiler
* Checks whether the right mouse button is just pressed.
*
* @static
* @method isCancelled
* @return {Boolean} True if the right mouse button is just pressed
TouchInput.isCancelled = function() {
return this._cancelled;
};
Because I'm a total noob at programming I have absolutely no idea what there should stand...
In this thread
Astfgl66 wrote this little plugin
Spoiler
(function() {
var _Astfgl_newSMU = Scene_Map.prototype.update
Scene_Map.prototype.update = function() {
_Astfgl_newSMU.call(this);
if (TouchInput.isCancelled()) {
$gameTemp.reserveCommonEvent(4); //change 4 to the id of the common event you want to call
}
}
})();
so my questions are: what do I have to write underneath the if (TouchInput.isCancelled()) { line to actually have a key (especially the alt key, or another custom keymapper key) pressed when I rightclick the mouse? Is that even possible?
I tried to program for hours now, trying do get the right syntax and commands and stuff, but without ANY knowledge it's way too hard to figure it out... But kind of interesting
😀
Thanks in advance!
EDIT: Is there maybe a way to even "keymap" the right mousebutton?