Klimber

Villager
Member
Joined
Apr 2, 2020
Messages
21
Reaction score
2
First Language
Ukrainian
Primarily Uses
RMMV
Hello! Please tell me the script command that changes the standard maker control from arrows to WASD.
I using Yanflay plugin KeyboardConfig, but he was not change default setting on start game.
It is important that the arrows also continue to work.
Thanks in advance.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
5,713
Reaction score
2,257
First Language
Dutch
Primarily Uses
RMMV
you can do it with the keyboardConfig though and place arrow movement
also on the AWSD buttons correctly.

if that dont work, there is also a keymapper plugin you can use for it.
as I'm no fan of AWSD, I mostly remove that, but it should work
with the plugin you have.
 

Klimber

Villager
Member
Joined
Apr 2, 2020
Messages
21
Reaction score
2
First Language
Ukrainian
Primarily Uses
RMMV

ShadowDragon


Thank you! But I don't think I understand you correctly... Is there any other variants?
 

Nolonar

Veteran
Veteran
Joined
Feb 18, 2018
Messages
421
Reaction score
576
First Language
French, German
Primarily Uses
RMMZ
You can also just write your own simple plugin:
JavaScript:
Input.keyMapper[87] = "up";    // W
Input.keyMapper[65] = "left";  // A
Input.keyMapper[83] = "down";  // S
Input.keyMapper[68] = "right"; // D
Save it to a .js file and load it like you load any other plugin.

I don't recommend doing this in a script command, unless it's temporary. Otherwise the WASD mapping will only be valid until the player exits the game. Once they load their save game again, the mapping will be gone. It will also lead to weird behavior, like WASD sometimes working on the title screen and sometimes not. You probably don't want that.
 

Arthran

Veteran
Veteran
Joined
Jun 25, 2021
Messages
313
Reaction score
263
First Language
English
Primarily Uses
RMMZ
You can also just write your own simple plugin:
JavaScript:
Input.keyMapper[87] = "up";    // W
Input.keyMapper[65] = "left";  // A
Input.keyMapper[83] = "down";  // S
Input.keyMapper[68] = "right"; // D
Save it to a .js file and load it like you load any other plugin.

I don't recommend doing this in a script command, unless it's temporary. Otherwise the WASD mapping will only be valid until the player exits the game. Once they load their save game again, the mapping will be gone. It will also lead to weird behavior, like WASD sometimes working on the title screen and sometimes not. You probably don't want that.
It's also probably worth noting that doing this will override the fact that W is already mapped as "pagedown". So maybe toss in an extra line to re-map "pagedown" to E or something:
JavaScript:
Input.keyMapper[69] = "pagedown"; // E
 

Klimber

Villager
Member
Joined
Apr 2, 2020
Messages
21
Reaction score
2
First Language
Ukrainian
Primarily Uses
RMMV
Thanks! I add this script in js. file, switch on he in maker and all working. Character moves with WASD:)
 

Latest Threads

Latest Posts

Latest Profile Posts

The main game of my trilo/saga 50%OFF on Steam..... its now or never more
I swap between Ace and MZ so I can stay fresh but - what do you mean you can use subfolders in the plugin's folder for easier organization!?
Did some new music again, praise be. To the next song!
Watch Studio Blue play Numina by starlit in our latest RPG Maker Games Critique stream starting NOW!

Forum statistics

Threads
123,141
Messages
1,154,289
Members
161,478
Latest member
mrlimbs
Top