isaias20

Regular
Regular
Joined
Aug 21, 2021
Messages
38
Reaction score
12
First Language
english
Primarily Uses
RMVXA
clicking an event while in front of it

hello. i am using this plugin "Mouse System Ex" to use mouse in my project.

the tag click_activate! allows to trigger an event by clicking on it no matter how far away the player is.

If I remove the tag, I can't trigger the event with mouse if player in front of it, is there a way to fix this? I have to use ENTER or some key.

i want that in some game events the player has to be in front of them to trigger them using the mouse.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
16,827
Reaction score
9,350
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Thank you.

 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
8,246
Reaction score
3,518
First Language
Dutch
Primarily Uses
RMMV
Mouse options as for distance always work.
some plugins can only trigger from a small distance (like 3), but also
when facing up next to it, or facing the event.

if you want specifically be in front and facing the event, than it need
to be modified or be added to the plugin.

but I dont have any clue if that is even possible, and if it is,
the comment tag or notetag of the event is longer.

like: <event: trigger_activated, distance, direction, face_directen?>

so if you can activate it on distance, the distance can be any number,
direction of the event to be triggers (1, 2, 3, 4, 5, 6, 7 ,8 ,9)
and the face direction, towards the events face away etc.

but while it is outside my lead, I dont know if any have something like that.
 

Lady_JJ

Regular
Regular
Joined
May 6, 2019
Messages
479
Reaction score
398
First Language
English
Primarily Uses
RMMZ
Couldn't you just compare the player x,y with the event x,y and do a conditional. If playerX = eventX and playerY = eventY+1 then desired action, else do nothing (or give a message the player needs to come closer)?
I favor keys over mouse, though, so perhaps I'm mistaken.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,755
Reaction score
11,371
First Language
English
Primarily Uses
RMMV
My two cents...I have not tried to use this plugin. But from reading through the thread, it's clearly deprecated and to some degree buggy.

What you describe is not something you're doing wrong, it's a bug in the plugin. By default in MV, if you click on an event you will (walk up to it if necessary and then) activate it. So something in the plugin must be breaking that default code.

As the author is no longer active, you're basically hoping someone else will be interested enough to fix another person's plugin :stickytongue:

Have you already checked that there isn't another, more current plugin that can do the things you want?
 

isaias20

Regular
Regular
Joined
Aug 21, 2021
Messages
38
Reaction score
12
First Language
english
Primarily Uses
RMVXA
My two cents...I have not tried to use this plugin. But from reading through the thread, it's clearly deprecated and to some degree buggy.

What you describe is not something you're doing wrong, it's a bug in the plugin. By default in MV, if you click on an event you will (walk up to it if necessary and then) activate it. So something in the plugin must be breaking that default code.

As the author is no longer active, you're basically hoping someone else will be interested enough to fix another person's plugin :stickytongue:

Have you already checked that there isn't another, more current plugin that can do the things you want?

my project has code (what i found in this forum) to disable pathfinding until the event you click, but the bad thing about this code is that it also disables mouse interaction with these events.


JavaScript:
Game_Temp.prototype.setDestination = function(x, y) {

if ($gameSwitches.value(1)) { return };
this._destinationX = x;
this._destinationY = y;
};

Is there a way to disable pathfinding without removing click interaction with events?

Update 2:
I found in this post the code that allows to remove the movement towards the event without removing the interaction with the mouse.

JavaScript:
Game_CharacterBase.prototype.moveStraight = function(d) {
    this.setMovementSuccess(this.canPass(this._x, this._y, d));
    if (this.isMovementSucceeded()) {
        if (TouchInput.isTriggered() || TouchInput.isPressed() || TouchInput.isLongPressed()) return;
        this.setDirection(d);
        this._x = $gameMap.roundXWithDirection(this._x, d);
        this._y = $gameMap.roundYWithDirection(this._y, d);
        this._realX = $gameMap.xWithDirection(this._x, this.reverseDir(d));
        this._realY = $gameMap.yWithDirection(this._y, this.reverseDir(d));
        this.increaseSteps();
    } else {
        this.setDirection(d);
        this.checkEventTriggerTouchFront(d);
    }
};

If I don't have any plugin it works great but if I have mouse system ex plugin it doesn't work, because I have to remove the click_activate! and if I do, it won't allow you to interact with the events by clicking on them.

the truth, I need that plugin in my project. :(
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,755
Reaction score
11,371
First Language
English
Primarily Uses
RMMV
I'm very confused. It would be helpful for you to explain what the purpose of click_activate! is, since the documentation page for this plugin is no longer a valid link.

I was presuming that it made the event activate without moving your character toward it. But if that's the case, why do you have separate code that also does that? You don't need this click_activate! just to activate events by clicking on them, because that's how MV works by default.

Can you explain a bit more clearly?
 

isaias20

Regular
Regular
Joined
Aug 21, 2021
Messages
38
Reaction score
12
First Language
english
Primarily Uses
RMVXA
I'm very confused. It would be helpful for you to explain what the purpose of click_activate! is, since the documentation page for this plugin is no longer a valid link.

I was presuming that it made the event activate without moving your character toward it. But if that's the case, why do you have separate code that also does that? You don't need this click_activate! just to activate events by clicking on them, because that's how MV works by default.

Can you explain a bit more clearly?

the tag click_activate! allows you to trigger events with the mouse from any distance from the player to the event.

I don't want that, I want the player to have to be in front of the event to trigger it with the mouse.

If I remove the click_activate! tag, the plugin does not allow to interact with the events using the mouse or even being in front of the event.

but if I put the tag, it will allow to activate them from any distance from the player to the event, (which I don't want)
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,755
Reaction score
11,371
First Language
English
Primarily Uses
RMMV
Then we go back to my original question - what is the plugin doing that you do want? By default, clicking an event will cause the player to move next to the event before activating it (or activate it, if they're already next to it).

If it's just changing the cursor and such, there have got to be other plugin options to do that.

With a cursory look, you could try modifying line 793 to read:
Code:
if (game_event.TDDP_MS.clickActivate && Math.abs($gamePlayer.x-x)+Math.abs($gamePlayer.y-y)==1)
and that should disable the event from activating remotely.

I'm not sure it will restore the functionality to move toward the event, though...there's too much modified junk in there for me to try to read through and understand it all.

Good luck!
 

isaias20

Regular
Regular
Joined
Aug 21, 2021
Messages
38
Reaction score
12
First Language
english
Primarily Uses
RMVXA
Then we go back to my original question - what is the plugin doing that you do want? By default, clicking an event will cause the player to move next to the event before activating it (or activate it, if they're already next to it).

If it's just changing the cursor and such, there have got to be other plugin options to do that.

With a cursory look, you could try modifying line 793 to read:
Code:
if (game_event.TDDP_MS.clickActivate && Math.abs($gamePlayer.x-x)+Math.abs($gamePlayer.y-y)==1)
and that should disable the event from activating remotely.

I'm not sure it will restore the functionality to move toward the event, though...there's too much modified junk in there for me to try to read through and understand it all.

Good luck!

it worked, you're a genius, thank you very much!
 

Latest Threads

Latest Profile Posts

Decided to splurge and commissioned a friend to draw the main character of my game jam project. Worth it! I never could've gotten the game and the art done XD New avatar by ClockworkCrane!
One of my biggest pet peeves? Action Button events not being interactable unless they are same as character.


Like... for why?
The X-Mas and ~ all ~ December long Calendar Project seems to bring my machine right to the limit. A very good oportunity to test what my pc can do. Or at which point I should decide to take a step back from filling the rendering program with assets.
The new grafics card and ram do their job well, that's for sure. My own early Christmas gifts were a good investment.
my laptop keyboard gave up, they keep glitching out, it seems like it's time to finally replace them, honestly surprised it lasted this long.
Tiny setback. Turns out my Title Screen image and one of my primary background & avatar images are AI Generated. Glad I went back and checked all my resource links. So I am in hot pursuit of replacement images. Which is fine since I was still missing some images that I need anyway.

Forum statistics

Threads
136,894
Messages
1,271,137
Members
180,673
Latest member
SnailKing
Top