Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Changing the controls of your game!

This may or may not have been done. I've poked around the site and have found similar things, but my scripting skills aren't good enough to adapt them to what I need myself.

I'm currently using Alework's Options menu, and I already have a good amount of skill with it. My plan is to have an option heading called 'Controls' and inside the submenu, 6+ selections. Down, Up, Left, Right, Accept/Interact, and Cancel/Menu. When accessing one of these 6 options, you would be able to switch what key is (or keys are) used for those function.

So a default game would have:

Up - Up Key (I'm unsure of what other keys do this function)
Down - Down Key
Left - Left Key
Right - Right Key
Accept/Interact - Enter, Space
Cancel/Menu - Escape
(and any other function keys RMXP uses, I only know of the 6 from previous RMs)

You'd go to say, Up, select it, and enter in another key into the box or whatever...

Up - H

And now H functions as the 'Up' button!

Now I know that I need a Keyboard module - I am using BlueScope's enter hero name script that uses the Keyboard Input Module by Cybersam, and I'm assuming that will work.

The only problem is, I don't know how to go from Step A to Step B. I don't know how to make the jump from having a keyboard module and an options menu set up, to making control switching fully functional. I have a feeling it's only a tiny bit of code that is repeated but slightly changed for each key/function, but I can't for the life of me figure out what it is.

Can anybody help me with this one?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top