answersLogoWhite

0

The ord() function is simple. It allows you to use any key that doesn't have a constant (like vk_up) with the keyboard functions. Take a look:

{

if keyboard_check(ord("A"))

{ x - 4};

}

This checks whether the player is pressing the A key, and if the player is, the object will move left. You can also use numbers:

{

if keyboard_check(ord("1"))

{ show_message("No way! You pressed the 1 key! :D")};

}

User Avatar

Wiki User

9y ago

What else can I help you with?