isaias20

Villager
Member
Joined
Aug 21, 2021
Messages
26
Reaction score
11
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,624
Reaction score
9,218
First Language
English
Primarily Uses
RMMV

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

 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
5,752
Reaction score
2,268
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

Veteran
Veteran
Joined
May 6, 2019
Messages
417
Reaction score
306
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
Veteran
Joined
Jul 2, 2014
Messages
4,599
Reaction score
2,938
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

Villager
Member
Joined
Aug 21, 2021
Messages
26
Reaction score
11
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
Veteran
Joined
Jul 2, 2014
Messages
4,599
Reaction score
2,938
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

Villager
Member
Joined
Aug 21, 2021
Messages
26
Reaction score
11
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
Veteran
Joined
Jul 2, 2014
Messages
4,599
Reaction score
2,938
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

Villager
Member
Joined
Aug 21, 2021
Messages
26
Reaction score
11
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

Hello guys i dont know how to start thread? Can anyone help? I wanted to ask rpgmaker mz turn based tactical tutorial or help.
Played and finished Mad Father, one of the older RPGmaker horror games out there. That was one mad, MAD father
Hi, I am new here, exciting! Emmm where to change my head portrait?

Forum statistics

Threads
123,377
Messages
1,156,145
Members
161,824
Latest member
Krat
Top