ord(str);
Argument | Description |
---|---|
str | The string with which to find the Unicode code. |
Returns: Real
This function takes a string (of a single character only) and returns the Unicode value for that character. In this way you can, for example, store as integers individual key presses, and it is most commonly used
by the keyboard_check() functions.
if keyboard_check(ord("W"))
{
y -= 4;
}
This will move the calling instance four pixels upwards if the key W is held down.