Changing/ adding key commands to game

Status
Not open for further replies.

PhxFire

The Eternal Flame
Veteran
Joined
Jul 1, 2019
Messages
131
Reaction score
69
First Language
English
Primarily Uses
RMMV
Basically I want to clone the functions of the ESC key to the Backspace key in MV. Is this possible, also are you able to program in new commands to keys, or swap keys out for other ones?

Thanks!
 

standardplayer

Keeper of Kitties
Veteran
Joined
Apr 6, 2016
Messages
698
Reaction score
3,450
First Language
English
Primarily Uses
N/A

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Game Mechanic Design is for looking at aspects of game play at a more conceptual level. "How do I...? (Implementation) questions belong in the Support forum for the engine you are using.

[move]JS Plugin Requests[/move]
 

PhxFire

The Eternal Flame
Veteran
Joined
Jul 1, 2019
Messages
131
Reaction score
69
First Language
English
Primarily Uses
RMMV
@standardplayer So I checked out the keyboard config but I'm unable to assign anything to the backspace key... is there a reason for this?
 

standardplayer

Keeper of Kitties
Veteran
Joined
Apr 6, 2016
Messages
698
Reaction score
3,450
First Language
English
Primarily Uses
N/A
I see that, I actually never knew it didn't let you use the full keyboard until now, I guess I hadn't noticed it. That being said, there is a way to way to add an event for the backspace key fairly easily.
What I don't know how to do is access the event code of the Esc key, or emulate pressing it. I've been researching it for a bit now, I'll let you know if I find either of those things.

In the meantime, however, the Keyboard Config plugin does let you pick from nearly any button, does it absolutely have to be backspace?
 

bazrat

Pixel Game Maker MV
Veteran
Joined
Oct 15, 2018
Messages
241
Reaction score
176
First Language
English
Primarily Uses
Other
search DK full input, its amazing
 

PhxFire

The Eternal Flame
Veteran
Joined
Jul 1, 2019
Messages
131
Reaction score
69
First Language
English
Primarily Uses
RMMV
@bazrat I checked out the DK tools and they seem cool, but I get a Now Loading... screen everytime I launch the game now even with everything disabled in DK Tools
 

bazrat

Pixel Game Maker MV
Veteran
Joined
Oct 15, 2018
Messages
241
Reaction score
176
First Language
English
Primarily Uses
Other
@bazrat I checked out the DK tools and they seem cool, but I get a Now Loading... screen everytime I launch the game now even with everything disabled in DK Tools
Well that sucks, lol
 

PhxFire

The Eternal Flame
Veteran
Joined
Jul 1, 2019
Messages
131
Reaction score
69
First Language
English
Primarily Uses
RMMV
I've decided to abandon this idea for now and just hold out hope that Yanfly adds support for the backspace key haha
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
Don't give up!

You don't need a fancy plugin that's thousands of lines long with dozens of features to do this -- it's literally one line of code:

Code:
Input.keyMapper[8] = 'escape'
^^ Add that as a new plugin and the Backspace key will do the exact same thing as the Escape key.

The keyMapper maps keys from a number to a word. The number is the literal ASCII value of the key, and the word is what RMMV will check for. That way, you can have multiple keyboard keys that do the same thing inside MV.

To see the default mapping, just open your console in a playtest and type in "Input.keyMapper"

upload_2019-7-8_20-44-46.png

To discover what numbers correspond to which keyboard keys, you should be able to look that up pretty easily.
 

PhxFire

The Eternal Flame
Veteran
Joined
Jul 1, 2019
Messages
131
Reaction score
69
First Language
English
Primarily Uses
RMMV
@Aloe Guvner you're a life saver! See that's why I love this site, I'm here thinking of all these complex ways to try and work around it and I didn't even think of adding my own code through a plugin [Facepalm]
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top