• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker How to get alphabet only keyboard input

Hi,
Currently i'm using this code inside 'key press - any' event :

GML:
if(keyboard_check(ord("A"))){
    audio_play_sound(snd_click,10,false);
}
That code only check if the inputted key is 'A'
How can i check if the inputted key is A to Z ?
 
S

Seknight

Guest
you could use keyboard_string to get a list of which keys were pressed

and then use ord to check if the key pressed was between A to Z

Tell me if you need more specific instructions, though I haven't actually tried this myself.
 
Top