RMMZ Disable Mouse Movement, Allow Mouse Activation of Adjacent Events

OMGerm

Veteran
Veteran
Joined
Apr 18, 2012
Messages
37
Reaction score
4
First Language
English
Primarily Uses
I'm attempting to use setDestination to allow activation of events via mouse click, while simultaneously disabling mouse click to move. setDestination appears to be used for both actions, so I'm attempting to parse out the functionality. I've listed some initial code below but it seems to be throwing a 'property of undefined findDirectionTo' error. I'm also unsure if I'm on the right track with this. Any insight would be helpful.

JavaScript:
Game_Temp.prototype.setDestination = function(x, y) {
    let goalX = x;
    let goalY = y;

    // compare the current position to the goal position to get the direction
    let direction = this._player.findDirectionTo(goalX, goalY);

    // if the direction is 0, then the player is already at the goal position
    if (direction > 0) {
        checkEventTriggerTouchFront(direction);
    }
};
 

Latest Threads

Latest Profile Posts

So... me, always ALWAYS late.. have started reading the One Piece manga. So far I'm impressed with it. It's definitely a fun read. The only thing I need to get used to is every... single... character having a flashback story. Wifey is a huge fan and she's asked me to draw Nami and Boa Hancock for her. So I may post those drawings here XD
My brother makes some inane complaint about one of my stories in the comment section. My mom: if your bro doesn't understand it make it simpler. That prolly means others have questions too.☺️Me: Sorry. I can't do that. I don't speak stupid.
If you are ever looking for your cat among a room full of identical looking cats just find the one that is doing it's best to ignore you.
Isn't "tableau" such a fun word to say? Even better is that our resident artists know what it means without google and probably get to say it regularly.
ScreenShot_3_27_2023_4_30_39.png
one of the benefits of doing almost all the assets myself is being able to add my friend's OC from his comic book into my game as an NPC.

Forum statistics

Threads
129,894
Messages
1,206,030
Members
171,072
Latest member
mimbry
Top