You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would seem that when holding a button with btnp() and hold and period parameters are set, pressing an other button resets the hold time.
So when holding the button and pressing an other button constantly before the hold time is met, the first button never returns true again.
Here is a quick example for testing purposes:
-- title: game title
-- author: game developer
-- desc: short description
-- script: lua
-- input: gamepad
color=0
function TIC()
if btnp(4,30,1)then color=(color+1)%16 end
cls(3)
print("Hold A for half a second,")
print("colors will cycle every frame.",0,6)
print("If you press any other button before half",0,12)
print("a second while still holding A, it seems",0,18)
print("the hold parameter of btnp() resets.",0,24)
rect(99,47,42,42,15)
rect(100,48,40,40,color)
end
The text was updated successfully, but these errors were encountered:
It would seem that when holding a button with btnp() and hold and period parameters are set, pressing an other button resets the hold time.
So when holding the button and pressing an other button constantly before the hold time is met, the first button never returns true again.
Here is a quick example for testing purposes:
The text was updated successfully, but these errors were encountered: