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

ADMtn

Village Serjeant-at-Law
Veteran
Joined
May 23, 2020
Messages
95
Reaction score
54
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
668
Reaction score
368
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

Village Serjeant-at-Law
Veteran
Joined
May 23, 2020
Messages
95
Reaction score
54
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,698
Reaction score
7,362
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

Village Serjeant-at-Law
Veteran
Joined
May 23, 2020
Messages
95
Reaction score
54
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
523
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,698
Reaction score
7,362
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


Todo:
Add fog of war
Add enemy indicators
Make window draggable
Optimise map drawing algorithm (5 seconds to load the map you see, so it's a... poo-poo algorithm)

Any suggestions? :kaoblush:
bleh studio hell job haha at least they like it didnt had time to do much laundry tho ;w;'....YES I DO AT LEAST TAKE A SHOWER everyday!
Ami
--- Food Ingredients ---

Hero: Since the Chef are in Hospital,we can't eat his Dish in 3 Days.
F.Mage: What we have to Eat?
M.Healer: Don't worry,we can Eat the Food Ingredients.
Hero & F.Mage
: Really?

(3 Days Later)

Chef: Hi,Guys. I'm Ba---
(Entire Party Collapse After Eat Raw Meat)
Chef: Wha...WHAT GOING ON HERE!!!!!!
So, I've been thinking about all the complaints about the chibi sprites. Is the problem that they're chibi or that they don't match the character art? If I did a series of chibi/SD character art, would people be interested?
Converting a timer plugin from MV to MZ. Now I really start to fell how awesome the new plugin commands are. This really helps create plugin easier than before!

Forum statistics

Threads
102,909
Messages
995,903
Members
134,359
Latest member
thammycatmi
Top