Hello, good day.
I'm trying to make it possible to move objects in my game to another location on the map using the mouse cursor.
See image:
I get the mouse coordinates (variables 201 and 202)) and then tell it to "Set event location" to move the event (this event) to that position in a parallel process so that the event follows the mouse position at all times.
Then, when clicked, the event will be placed at that position.
I've already tried not only the "set event location" event command but also this script call:
And nothing happens; the event doesn't move in real time to the mouse position.
I've even tried setting different frame rates, and it's still the same.
Is there any way to move it?
Thanks.
I'm trying to make it possible to move objects in my game to another location on the map using the mouse cursor.
See image:
I get the mouse coordinates (variables 201 and 202)) and then tell it to "Set event location" to move the event (this event) to that position in a parallel process so that the event follows the mouse position at all times.
Then, when clicked, the event will be placed at that position.
I've already tried not only the "set event location" event command but also this script call:
JavaScript:
var ev = $gameMap.event(this._eventId); // reference to the event itself
var x = Math.floor($gameMap.canvasToMapX(TouchInput.x));
var y = Math.floor($gameMap.canvasToMapY(TouchInput.y));
ev.locate(x, y);
And nothing happens; the event doesn't move in real time to the mouse position.
I've even tried setting different frame rates, and it's still the same.
Is there any way to move it?
Thanks.