function draw()
sprite(“Documents:melle”, WIDTH/2, WIDTH/2)
fill( 255, 0, 0 )
print(CurrentTouch.tapCount)
end
I need help with (CurrentTouch.tapCount) so it dosent restart the counting wen I wait a bit
function draw()
sprite(“Documents:melle”, WIDTH/2, WIDTH/2)
fill( 255, 0, 0 )
print(CurrentTouch.tapCount)
end
I need help with (CurrentTouch.tapCount) so it dosent restart the counting wen I wait a bit
I’m doing a cookie clicker game
TapCount is for registering a double / triple tap gestures. It is meant to reset. If you want to count total touches, have a variable, add one to it every time a tap registers.
@XAlord There have been several cookie clicker games done here already. Search the forum and look thru their code.
This should help:
function setup()
taps = 0
end
function draw()
sprite("Documents:melle", WIDTH/2, WIDTH/2)
fill( 255, 0, 0 )
end
function touched(touch)
if touch.state == BEGAN then
taps = taps + 1
print(taps)
end
end