MV Set event location does not work in parallel process

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:

chest move.png


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.
What turns self switch A on in the first place?
What turns self switch A on in the first place?

This is the first page of the event


1756743326707.png
Please check if the variables used in the event command have the ID's used in the script lines. to see if you made a mistake there.

Then add a show text inside the conditional branch to output the values of the coordinates.

Another idea: I don't know how the javascript function for touchinput works, but try to move it to the inside of the conditional branch as well - it could be that the input trigger disables the selfswitch before the script command can read out the values. I doubt that, but make sure of it.
Please check if the variables used in the event command have the ID's used in the script lines. to see if you made a mistake there.

Then add a show text inside the conditional branch to output the values of the coordinates.

Another idea: I don't know how the javascript function for touchinput works, but try to move it to the inside of the conditional branch as well - it could be that the input trigger disables the selfswitch before the script command can read out the values. I doubt that, but make sure of it.

I've already checked, the coordinates are the same (variables 201 and 202).

I've already put a console.log and it perfectly captures the coordinates where the mouse moves.

I've already placed everything inside the conditional branch, and the event still doesn't move anywhere.
I thought MV doesn't update that TouchInput stuff before you click? I just tried it with an event like that and make it show those variables in a text box and they stay the same until I click. Then they update and the event transfers. I bet you Caethyril has made you a plugin for this that updates it.

Original thread: https://forums.rpgmakerweb.com/threads/set-event-location-does-not-work-in-parallel-process.179889/