isaias20

Veteran
Veteran
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,768
Reaction score
9,304
First Language
English
Primarily Uses
RMMV

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

 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
7,513
Reaction score
3,022
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
476
Reaction score
392
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
8,908
Reaction score
6,716
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

Veteran
Veteran
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
Veteran
Joined
Jul 2, 2014
Messages
8,908
Reaction score
6,716
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

Veteran
Veteran
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
Veteran
Joined
Jul 2, 2014
Messages
8,908
Reaction score
6,716
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

Veteran
Veteran
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 Posts

Latest Profile Posts

The forum stalled for a second and I thought I got banned for using 1 swear word. :kaoswt2:
Today years old when I realized I can track Last Skill ID used as a variable... natively in engine....

*sighs in reconstructing skill system*
Well, another class starts tomorrow. About 2 weeks of teaching them virtually and then they arrive on campus for about 4 weeks of in-person instruction. The next batch of Snorlax Acolytes is hopefully ready to go!
I notice that my examples are so often based on what Fallout and Skyrim did.
Yet none of my games have anything based on anything Fallout or Skyrim did.
Isn't that funny?

Forum statistics

Threads
131,748
Messages
1,222,898
Members
173,498
Latest member
hyotae
Top