answersLogoWhite

0

How do you use the ORD function?

Updated: 9/13/2023
User Avatar

Wiki User

8y ago

Best Answer

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

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you use the ORD function?
Write your answer...
Submit
Still have questions?
magnify glass
imp