[SOLVED] Is there a way to prevent clicking from moving the Player during Events?

Hello RMMV Community,

[Figured out my own solution, but I think Soulrender's solution below works as well. Going to rephrase my question so it's clearer--in case anyone else has the same question:]

The Problem:

During Events, when the designer intends the Player character to stay still, clicking/tapping somewhere on the map can move the Player character out of its intended route (and potentially cause the event/game to lock up).

Anecdotally, this problem seems to occur if the event is running a (parallel) sound effect, animation, or having other Events move.

Solution:

Right before the other processes (i.e., the other things happening in the Event during which time the player can click around when you don't want them to):

Use Set Movement Route for the Player character, have the movement set to simply Wait for 999 frames and make sure Wait for Completion is OFF (this way, the waiting occurs in parallel to the event contents which follow; having the Player move/transferred within that 999 frame window will override the waiting, which is why it's okay to set it to 999).

Thanks,

ADM
Yes, at start event use script:
$gamePlayer.setMoveSpeed(0);

and at the end event restore it with
$gamePlayer.setMoveSpeed(4); (Or any other value u use for movement speed)
Awesome, thanks!

I found another way to solve the problem, too. Going to edit my original post and also refer to your solution.
the default should be that the player cannot move during events. ONLY in case of parallel processes or if you end the event before the moveroute ends the player should be able to move independently.

If you aren't using one of those two cases, then some of your plugins changed the engine. If you're using one of those cases the simplest solution would be to modify the events to not be those two cases.
If you need help with that simply post a screenshot of the event and we can tell you how to change it.
the default should be that the player cannot move during events. ONLY in case of parallel processes or if you end the event before the moveroute ends the player should be able to move independently.

If you aren't using one of those two cases, then some of your plugins changed the engine. If you're using one of those cases the simplest solution would be to modify the events to not be those two cases.
If you need help with that simply post a screenshot of the event and we can tell you how to change it.

You're right--

I think I'm essentially running parallel processes within the same event by having animations/movements which are not set to Wait for Completion. This is because I like having multiple characters moving at once (so it's not just one character taking long, leisurely walks by themselves while everyone else is frozen).

So far, I'm not using any plugins. Trying to make a short-ish first game which relies only on the out-of-the-box features of RMMV.

My solution in my edited original post above (setting the Player character's movement to wait for a long time while the parallel processes are occurring) seems to be working pretty well.

Thanks for troubleshooting! All good to know info.
If I understand correctly, you're making several characters move simultaneously using movement routes that don't wait for completion, but then the player gets control back immediately, right?

If that's the case, then I think you should be able to make something that works by simply ticking Wait For Completion on the final movement route (ideally that one would also be no shorter than the others).

Alternatively, if you're open to using plugins, there's my SFG_Wait as well as an SRD plugin which both offer a way to just wait for characters to finish moving through their routes.
This is because I like having multiple characters moving at once
there is no problem with moving multiple events, as long as you have a single controlling event for all of those moves, and that controlling event must not give control back to the player before every other event finishes moving.
I think your events are missing several of the tricks available to do that, and that is why it messes up your scene. the one mentioned above "one wait on the last route" is only one of several options.
I really suggest you show screenshots of your events so that we can tell you where you made mistakes.

Original thread: https://forums.rpgmakerweb.com/threads/solved-is-there-a-way-to-prevent-clicking-from-moving-the-player-during-events.125160/