-
Notifications
You must be signed in to change notification settings - Fork 1
btnp
Kyuchumimo edited this page Apr 24, 2024
·
9 revisions
🕹️ This function by default only supports 1P ID input
btnp([id], [hold][NOT SUPPORTED], [period][NOT SUPPORTED]) -> is_pressed
btnp() -> GAMEPADS data
- id : the id (0..7) of the button we wish to interrogate
hold : the time (in ticks) the button must be pressed before re-checkingperiod : the amount of time (in ticks) after hold before this function will returnTrue
again.
- is_pressed : button is pressed now but not in previous frame (true/false)
- GAMEPADS data : 8-bit value that represents a bitwise AND of the current and prior state of GAMEPADS data. Ie, a bitmask of buttons that were released in the prior frame yet currently held.
This function allows you to read the status of one of the buttons. It returns True
only if the key has been pressed since the last frame.