I'm trying to get a picture to move around using the arrow-keys or using the mouse (click-and-drag).
I know you can do this via the 'move picture' event.. but that only allows you to move it along a specified path.
Is there a way, or a plugin for MZ, that allows you to move a picture using the arrow-keys, or the mouse?
So let me start by saying I am not the most experienced person to offer advice, I can’t test this right now, and it depends on what you want it to look like in the game when it moves, but here is the first thing I would try through eventing.
I would use the Event Command option for if a certain button is being pressed through Conditional Branches and depending on which button is being pressed, that would erase the picture and put it back on the next tile in the appropriate direction using Variables.
You would store the X and Y location of the initial picture placement in 2 Variables. Then, by moving one tile in any direction, you are either adding or subtracting 1 from the X and/or Y Variable, as appropriate.
So, you have the X and Y location of the starting picture. The player pushes a button that tells the Event the picture should move one tile up. So you leave the X Variable the same and subtract 1 from the Y Variable. Then you use the new values of the Variables to Show Picture again in the new location.
Now, I don’t think that will have a smooth moving appearance and there are some things you would have to account for when the player wants to move in a direction they can’t.
But that is what I would test first if I wanted to try this.
Hopefully someone else will have a better and more elegant suggestion with Eventing or a Plugin.
I hope that helps a little!
For mouse movement keep in mind that not only do you have to factor in TouchInput's x and y properties, but also the acceleration of the mouse movement, in order to accurately track where the picture is moving in relation to the mouse.