How to get the playable character to follow your mouse without clicking.

Hello! I'm very new to RPGMaker MZ and was experimenting with various plugins and code, however, I was wondering if I could have the playable sprite once it interacted with an event would trigger the character to follow the mouse autonomously without the person having to click the mouse. I haven't posted on a forum before, so I apologize if this is the wrong place.
The mouse's (screen) coordinates you can retrieve using TouchInput.x and TouchInput.y. So I suppose you could compare these to the screen coordinates of the player, which would be $gamePlayer.screenX() and $gamePlayer.screenY(), and move the player to a direction depending on that.
There's a drag and drop tutorial by Poryg you could use.
There's a drag and drop tutorial by Poryg you could use.

TYSM I'll check this out!

The mouse's (screen) coordinates you can retrieve using TouchInput.x and TouchInput.y. So I suppose you could compare these to the screen coordinates of the player, which would be $gamePlayer.screenX() and $gamePlayer.screenY(), and move the player to a direction depending on that.
Oh okay, I'll try to do it

Original thread: https://forums.rpgmakerweb.com/threads/how-to-get-the-playable-character-to-follow-your-mouse-without-clicking.173561/