Log In  


As simple as the subject.

  • Write a cart that uses btnp().
  • Run the cart.
  • Press and hold a button to see it repeats.
  • Hit esc to stop the cart.
  • Enter 'resume' to resume the cart.
  • Press and hold a button and see if it fails.

(Either that or key repeat isn't supposed to be a thing with btnp() and it only works right after you resume.)

This code is sufficient to show it:

boops=0
function _update()
  if btnp()!=0 then
    boops+=1
    print("boop #"..boops)
  end
end

Note: tested on win64 version.



You're right ! If you run your program, press [ESC] to STOP it, then manually type out RESUME followed by [ENTER], the key repeat function no longer works.

Same results if you place this code in _draw() instead.
Yeah, there's something screwy going on with exiting and RESUME() as Felice found.

Something for the ZEP to fix.

Try this update for fun:

boops=0
function _update()
  if btnp()!=0 then
    _update_buttons()
    boops+=1
    print("boop #"..boops)
  end
  _update_buttons()
end

Not very exciting, but now press [ESC] and type RESUME. And there it is, BTNP() with top-speed repeat in place.



[Please log in to post a comment]