With portions of my story requiring the party to occasionally venture underwater, I decided that I would build it out so that it's accurate and realistic (or in other words, they can't simply ingest water and expect to survive) and therefore I need to map out the input controls for these segments and structure them around the expected equipment. More specifically, I'm only concerned with the bare minimum of expectations so I'm focusing on swapping between their breathing devices and the controls to inflate (or deflate) the air pockets in their vest harnesses. I also require that the input code is written so that it doesn't override any of the other functions (interactions, pause menu, movement etc.) and switches back to the normal MV inputs when they're out of the water.
MV Diving System Input Controls (SOLVED)
JS Plugin RequestsI have no idea from that post what you're asking for.
Are you just asking generally how to change control schemes? You could run a common event that uses script calls to change what the values in Input.keymapper do - but it's not at all clear from your post what you would want to happen when keys are pressed.
Are you just asking generally how to change control schemes? You could run a common event that uses script calls to change what the values in Input.keymapper do - but it's not at all clear from your post what you would want to happen when keys are pressed.
Sorry if I wasn't clear on this. What I mean is that there are inputs in addition to the main controls that set the vest inflation level for ascending and descending, as well as a breathing device swap for parts of the game where I write scenes in which the primary regulator s***s the bed on the player.
Button Common Events (YEP) - Yanfly.moe Wiki
Common Event Buttons
By default, common events can only be executed when you have an event call a common event, or if a common event runs automatically when a condition is met.With this plugin, you can assign common events to certain buttons on the keyboard. When that button is pressed, the common event will be...
forums.rpgmakerweb.com
That's still not clear. None of that means anything in RPG Maker.
Either way, I got a suitable answer from @triso I'm good on that. Well, at least for the keyboard - I'm also going to be using gamepad controls so I need to map inputs for that (let's say x to inflate, y to deflate, and select to swap breathing devices).
Were you trying to @ me or are you talking about someone else?
I was referring to your suggestion, so yes. Unfortunately it doesn't seem to work anymore (or maybe I did something wrong). Either way, your response settles the question for keyboard controls, which only leaves the gamepad left to deal with.
Neat.
Just a suggestion, your profile says your first language is English. I don't know how you got triso, but it suggests you're using a translator. No shame at all, it's just helpful for other people to know.
Just a suggestion, your profile says your first language is English. I don't know how you got triso, but it suggests you're using a translator. No shame at all, it's just helpful for other people to know.
Probably just a typo (or that g**damn autocorrect on my phone). Sorry about that!
If you want to go the no plugin route, pageup & pagedown don't do anything on map by default and are already bound to LB & RB on a gamepad. So you can just do a parallel process to check if pageup / pagedown is pressed then do stuff.
Use Eli/Hakuen Studio's button common events instead of Yanfly's. It can do game controllers as well as keyboard
Hakuen Studio Button Common Events for RPG Maker MZ by Hakuen Studio
Bind keyboard keys to common events!
hakuenstudio.itch.io
Thanks for pointing that out. I did check with another developer who was able to create code for the Yanfly implementation which added controller input support (and allowed me to use those modifications) but for future reference I will consider the Eli implementation as well.
In any case, that basically takes care of everything so I'll go ahead and close this out.
This thread is being closed due to being solved. If you need it reopened, report it to let us know why. Thank you!
Original thread: https://forums.rpgmakerweb.com/threads/diving-system-input-controls-solved.167029/