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

ADMtn

Veteran
Veteran
Joined
May 23, 2020
Messages
99
Reaction score
59
First Language
English
Primarily Uses
RMMV
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
 
Last edited:

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
685
Reaction score
378
First Language
Poland
Primarily Uses
RMMV
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)
 

ADMtn

Veteran
Veteran
Joined
May 23, 2020
Messages
99
Reaction score
59
First Language
English
Primarily Uses
RMMV
Awesome, thanks!

I found another way to solve the problem, too. Going to edit my original post and also refer to your solution.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,732
Reaction score
7,378
First Language
German
Primarily Uses
RMMV
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.
 

ADMtn

Veteran
Veteran
Joined
May 23, 2020
Messages
99
Reaction score
59
First Language
English
Primarily Uses
RMMV
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.
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
525
Reaction score
230
First Language
English
Primarily Uses
RMMV
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,732
Reaction score
7,378
First Language
German
Primarily Uses
RMMV
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

I made a cool pixel render of my protagonist!
I think it looks neat.
RCXDan wrote on Leporine's profile.
Your avatar is adorable. Where is it from? :LZSproud:

Here is my valiant and beloved captain
of the space cruiser ROSTOV.

Forum statistics

Threads
103,184
Messages
997,861
Members
134,657
Latest member
beka222
Top