-
-
Notifications
You must be signed in to change notification settings - Fork 18
keyboard_key_release
drewmccluskey edited this page Feb 12, 2019
·
1 revision
Sets a keys state to false
keyboard_key_press(key)
Argument | Description |
---|---|
Keys key |
The keyboard button state being set to false |
Returns: void
This function will set a key to a state of false. This allows the user to have the same functions happen when a user would normally release a key. For instance, releasing the W button may make a character fall, but the programmer may want to release W or Space to make him fall. The user could then make it that when the spacebar is released the keyboard release W event is triggered.
if (keyboard_check_released(Keys.Esc))
{
room_restart();
}
if (keyboard_check_released(Keys.R))
{
keyboard_key_release(Keys.Esc)
}
This code will restart the game room when the user releases the Esc key as well as when the user releases the R key.
Back to Keyboard