btnp = "button pressed"

btnp( index, [player] )
index a button number or button symbol (see chart below)
player (optional) a player number (0-7)

If you hold the button down, this will only return true once because it also checks if on the last frame the button was not pressed. However, if you hold the button down for longer than 15 frames, then this resets and does return true. It will then continue to return true every 4 frames after that.

For multiplayer games, you will need to include player numbers (0-7).

These are the button indexes you can use:

Button Number Symbol
Left 0 shift+L
Right 1 shift+R
Up 2 shift+U
Down 3 shift+D
O 4 shift+O
X 5 shift+X

Custom Delay Length

You can set your own button delay by poking memory 0X5F5C like this:


You can set it to 255 to stop the btnp from resetting automatically at all, so that the player must release the button and press again for it to trigger again.

You can set your own repeating delay by poking memory 0X5F5D ike this:



10 Mar 2023