Certain situations require you to define multiple Keyboard blocks for every single Letter/Number/Key you need to evaluate.
(Player name entry, Level select, Numerical input for calculator? Just some examples)
My suggestion: We add an option to the Keyboard block that allows to read the ASCII value of the pressed key.
For some of above mentioned scenarios it would make life so much easier.
For the ones not familiar with ASCII, internally every key has a value (ID) assigned to it that identifies it. That’s how your computer evaluates what to do when a key is pressed (VERY simplified). ASCII is a standard that makes sure that everyone uses the same values for specific keys.
Here a table:
The way I imagine it is to add extra options to the existing Keyboard block.
Either this way:
When you select the ASCII tick box the [change key] box is greyed out and with each key press the ASCII value is forwarded to the normal outputs (down/up).
As an alternative the ASCII output could be kept separate (maybe providing the value always anyway?)
Same game, if [any key] is selected the [change key] box is greyed out and everything is send to the ‘ascii’ output.
Uses… as mentioned above, certain scenarios where you have to evaluate multiple keyboard inputs could be simplified.
For example … if you have the ASCII code you could allow the player to enter his name, store the numbers, and output it with the Dialog bundle I showed in another thread.
Movement … 4 way movement would need no switches to block opposite movements because you only get one vaue in the first place … only filters required (or expression)
Level select …
I hope I’m not the only one who sees this as useful, please comment if you support this idea or have better ideas of how to implement it.
(Separate ASCII block better?)
@grazer … what do you think, useful?