Rpg Maker MV: How to disable player movement until button press.

Hello,

I would like to have a cannon event which does the following:

If you touch the cannon event, the player turns invisible and cannot move. (Imagine that you are placed inside the cannon).
While inside, if you press a button, the player is turned visible again, and "fired" in a certain direction.
Once the flying movement stops, the player regains the ability to move.

I feel like this should be possible without plugins. I attach a couple of screenshots of what I have so far, but I don't know how to stop the player from moving while inside the "cannon".

Cannon1.PNG

Triggering the cannon event.


Cannon2.PNG

Firing the cannon.

Thank you in advance.
I can see two plugin-less ways of doing it:
- Don't end the event that puts the player in the cannon. After getting 'into' the cannon, have a loop with a wait command, and a conditional that breaks the loop when a button is pressed. Then do the launching.
- Stop the player's movement with other events. Surround the place the player stands with invisible events (without a sprite), set their priority to "Below characters", and have another page turned on by a switch with "Same as characters". Note that while this stops the player from moving, it doesn't stop them from turning, so those events would also need to react to the action button (e.g. setting a switch that the cannon reacts to).

And a side note, there's also a jump movement command, which might look a bit more like being fired from a cannon, though that depends on exactly what look you're going for.
set their priority to "Below characters", and have another page turned on by a switch with "Same as characters"
Just to note: while no event page conditions are met, the event will be inactive ("page -1"). So if the first "Below characters" page is invisible and doesn't do anything then it is harmless but unnecessary.
I can see two plugin-less ways of doing it:
- Don't end the event that puts the player in the cannon. After getting 'into' the cannon, have a loop with a wait command, and a conditional that breaks the loop when a button is pressed. Then do the launching.
- Stop the player's movement with other events. Surround the place the player stands with invisible events (without a sprite), set their priority to "Below characters", and have another page turned on by a switch with "Same as characters". Note that while this stops the player from moving, it doesn't stop them from turning, so those events would also need to react to the action button (e.g. setting a switch that the cannon reacts to).

And a side note, there's also a jump movement command, which might look a bit more like being fired from a cannon, though that depends on exactly what look you're going for.
Thanks, I've used the 2nd method and it seems to be working well. As Caethyril says, the "below characters" page doesn't seem to be necessary. I attach pictures of the current set-up in case it helps anyone who wants a similar effect, and also in case anybody here spots anything which I am doing wrong which might lead to problems. If nobody spots any problems in the next few hours then mods please feel free to close the thread as resolved. And thank you very much, again.

Cannon4.PNG

Cannon5.PNG

Cannon6.PNG

And finally, these are the invisible events that surround the cannon:
Cannon7.PNG
I have one thing worth noting about this: the faster the player's speed, the faster a jump will be completed, which actually affects the flight path. For lower speeds, the player will often go "higher", since they can spend more time airborne, but overall will still move rather quickly.
I'm not saying speeding up the player is wrong, it might just be perfect for what you're trying to do, but I do recommend trying this out with different speeds to see how they'll look like.

EDIT: And also, thank you for posting the full solution, it just might help someone in the future 🙂

Original thread: https://forums.rpgmakerweb.com/threads/rpg-maker-mv-how-to-disable-player-movement-until-button-press.161671/