Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hello, thank you for this resource.

I'd like to know if there's a way to get the assigned input as a string based on its keyname? Example: "getinput(keyname1)" leads to a string output of "C", if the player assigned keyname 1 to be "C".

(+1)

Nowis337_InputConfig.findKeyDisplaySymbol = function(keysymbol){

     let keycode = Object.keys(Input.keyMapper).find(value => Input.keyMapper[value] === keysymbol);

     return Nowis337_InputConfig.findKeyDisplay(keycode);

};

You can try copy and pasting this into the plugin and see if it works - it should convert the keyname like "up" or "ok" into what you have set as the key.

It seems to work smoothly on my end. Thank you very much for your time and for providing this code snippet!