• 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!

Legacy GM keyboard_check for ; ' , . /

Murzy

Member
Like this. Use the $ character to denote a hex value in game maker. I know, this isn't quite standard. I had to google it myself too :D

Code:
var keycode_comma = $BC;

if(keyboard_check_pressed(keycode_comma)) {
    show_message("keycode_comma");
}
 
Z

zendraw

Guest
another approach is checking a string in a switch statement
switch (last char in keyboard string)
{
case '.'://do staffa
case ';'://do stuff
}

i do it this way but the suggestion hogwater is better perhaps, more flexible.
 
Top