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
517
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

I FINALLY DID IT! 5 years making my very first game and I just officially released it on STEAM..... OMG..... I can say I finished a game! The feelings!!!!!
Stream will be live shortly! I am going to be playing some Among Us! Feel free to drop by!
Ami
tv program always get the ratings (it's the reason why drama series has 1000+ episode),also full and nonsense of censorship (weird blur, a scene getting cut because the unconvenient viewer,but it unconvenient to me either. you never see what the original is)

i know the reason is to take cover the viewer from the negative thing,but i just laughing and mocking of them that they're always suck :guffaw:
Star Chart Idea - Just something I am working on.
My sister learned spanish the old fashioned way and saw my way of conjugating. I don't use the formal method and just wing it. I thought her heart might explode. Apparently, different words use different endings. Weird part is even though I never learned the difference, I still can tell when the endings "look wrong".

Forum statistics

Threads
104,453
Messages
1,006,397
Members
135,962
Latest member
DeadMansWonderland
Top