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
392
Reaction score
524
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,258
Reaction score
4,734
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
392
Reaction score
524
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 Profile Posts

Hoping to see the first key claim soon...
ko dying.png
is it me or is the site just being really oof at the moment??? I'm sitting here like Ray waiting mad long for something to load lol.
Larvae.gif
They're larvae, not fightae, honest!
I've made a big emphasis on visually representing things to make the game as accessible as possible.

MP.png

Grimoires will consist of 5 - 10 pages of skills (still finalizing that max number)

Since each actor is able to take multiple actions per turn, each skill will cost 1-5 pages
This prevents more powerful skills from being uber spammed during an actors turn.
Cats are so easy. I noticed the gray one would never nap in the office while I worked, so I put a blanket on the spare chair in here and now she won't leave.

Forum statistics

Threads
136,774
Messages
1,269,788
Members
180,515
Latest member
kagal
Top