M
Mobie
Guest
As you might know, I use GMS2 to make educational games and I am trying to make one where using the comma is important. I have been trying various lines of code that I know (sort of) to make GMS2 recognize when a comma is pressed and have had no success. I've pasted my failed attempts below. I think the ASCII for a comma is 44. The "room_goto(rm_menu)" was just something stuck in there to see if it worked.
Can you offer any insight?
Gamemaker didn't react to any of these when I pressed the comma.
not this
if keyboard_check(ord(44))room_goto(rm_menu);
or this
if keyboard_check(ord(","))room_goto(rm_menu);
or this
if(keyboard_key == 44)room_goto(rm_menu);
or this
if keyboard_check(44)room_goto(rm_menu);
or this
if(keyboard_key == ord(44))room_goto(rm_menu);
This one fired instantly no matter which key was pressed
if(keyboard_key == ",")room_goto(rm_menu);
Can you offer any insight?
Gamemaker didn't react to any of these when I pressed the comma.
not this
if keyboard_check(ord(44))room_goto(rm_menu);
or this
if keyboard_check(ord(","))room_goto(rm_menu);
or this
if(keyboard_key == 44)room_goto(rm_menu);
or this
if keyboard_check(44)room_goto(rm_menu);
or this
if(keyboard_key == ord(44))room_goto(rm_menu);
This one fired instantly no matter which key was pressed
if(keyboard_key == ",")room_goto(rm_menu);
Last edited by a moderator: