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