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

LGardner

Regular
Regular
Joined
Dec 23, 2018
Messages
42
Reaction score
8
First Language
English
Primarily Uses
RMMV
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.
 

Mac15001900

JavaScript wild sorcerer
Regular
Joined
Aug 7, 2022
Messages
390
Reaction score
520
First Language
English
Primarily Uses
RMMV
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.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,240
Reaction score
4,695
First Language
EN
Primarily Uses
RMMZ
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.
 

LGardner

Regular
Regular
Joined
Dec 23, 2018
Messages
42
Reaction score
8
First Language
English
Primarily Uses
RMMV
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
 

Mac15001900

JavaScript wild sorcerer
Regular
Joined
Aug 7, 2022
Messages
390
Reaction score
520
First Language
English
Primarily Uses
RMMV
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 :)
 

Latest Threads

Latest Posts

Latest Profile Posts

Mike Final Breaker.png
that time I drew Mike doing Hugo from Street Fighter 3's Shootdown Backbreaker...
So I was thinking about putting in Weapon Synthesis like the Cooking system I got going but after all these recipes I've been putting in the item log and common events for the past week and a half I'ma say no on that one chief

those shops and chests are working just fine lmao
Just watched Godzilla Minus One.
As a Godzilla fan, I loved it. Acting was a little rough, and I thought the ending was cheap, but overall, great!
Could have used more plot.
Plot. I demand more fanservice!
giphy-downsized.gif
I should do a Photoshop with "Everyone Loves Reimond" and just stick Rei in the middle where Raymond's face would be.
Non-rare second status post but we closed the Third and Final Cameo Battle
Reveal_3&4_F.png

Forum statistics

Threads
136,637
Messages
1,268,274
Members
180,323
Latest member
fruy229
Top