Requesting mouse left and right input plugin to active events

Martin

Veteran
Veteran
Joined
Apr 8, 2015
Messages
191
Reaction score
46
First Language
swe
Primarily Uses
RMMV
Hello, I want to build a city builder kind of rpg. I have searched far and wide for some mouse input plugins but none is built for this. Need to have a left, AND right click action button on mouse. The plugin should know which of them is used when clicking a event so that we can i.e make a tool-menu for the event with right click and a action menu when left click.
I dont mind actually how it gets solved as long as we can communicate to the engine that this event is rightclicked so i can run event commands.

Maybe with a comment on the event pages like this
click_right A true;
click_left B true;

I really think this covers it. Let me know if you are interested and or need more info. :D happy rpg making!
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
954
Reaction score
520
First Language
Javascript
Primarily Uses
RMMZ
Hello, I want to build a city builder kind of rpg. I have searched far and wide for some mouse input plugins but none is built for this. Need to have a left, AND right click action button on mouse. The plugin should know which of them is used when clicking a event so that we can i.e make a tool-menu for the event with right click and a action menu when left click.
I dont mind actually how it gets solved as long as we can communicate to the engine that this event is rightclicked so i can run event commands.

Maybe with a comment on the event pages like this
click_right A true;
click_left B true;

I really think this covers it. Let me know if you are interested and or need more info. :D happy rpg making!
Something like this?
...this...
https://yanflyengineplugins.itch.io/event-click-trigger
..or maybe this?

...but with separate left/right click support?
(i think that only does left.. pretty sure at least)
 
Last edited:

Martin

Veteran
Veteran
Joined
Apr 8, 2015
Messages
191
Reaction score
46
First Language
swe
Primarily Uses
RMMV
Yeah, something like that, but just what i described. I think maybe that "Mouse system ex" can be modified to accept both TouchInput.isCancelled(); and touchinput.trigger. Hopefully someone understands it and throws us a bone :D

Edit:
Im starting out, but I have very little experience so please help

add on line 1066
Code:
this.TDDP_MS.rightclickSwitch  = false;
add on line 1109
Code:
$._findInEventNotetags(this, /rightclick_switch\s(.*?)\s(.*?);/i, function(result) {
            this.TDDP_MS.rightclickSwitch = {};
            this.TDDP_MS.rightclickSwitch.key = String(result[1]);
            this.TDDP_MS.rightclickSwitch.val = String(result[2]);

        });




I think this part is the last, but have not edited it yet.
Line 982
Code:
    /**
    * Alias and extend _onTrigger() to only fire if we're not activating on click
    */ 
    var _TouchInput_onTrigger = TouchInput._onTrigger;
    TouchInput._onTrigger = function(x, y) {
        if (TouchInput._activateClickEvents(x, y)) {
            $gameTemp.clearDestination(); // Invalidate destination
        } else {
            _TouchInput_onTrigger.call(this, x, y);
        }
    };
    /**
    * Activate click events if valid and return true if so
    * @method _activateClickEvents
    * @param x {Number} Map X coordinate
    * @param y {Number} Map Y coordinate
    */
    TouchInput._activateClickEvents = function(x, y) {
        var found_click_event = false;
        if ($.conditionsValidForMouseHoverCheck()) {
            var x = $gameMap.canvasToMapX(x);
            var y = $gameMap.canvasToMapY(y);
            $._eventsXy(x, y).reverse().forEach(function(game_event) {
                if (game_event.TDDP_MS.clickActivate) {
                    game_event.start();
                    found_click_event = true;
                };
                if (game_event.TDDP_MS.clickSwitch) {
                    var key = [$gameMap._mapId, game_event._eventId, game_event.TDDP_MS.clickSwitch.key]
                    $gameSelfSwitches.setValue(key, game_event.TDDP_MS.clickSwitch.val === 'true');
                    found_click_event = true;
                };
            });
        }
        return found_click_event;
    }
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,472
Members
137,822
Latest member
madelbylz
Top