Hello.
How can I make, that when „h“ is 1000 that h=h-h and t=t+1 turns?
Thats my code for this Question:
-- Clicker
displayMode(FULLSCREEN)
-- Use this function to perform your initial setup
function setup()
fontSize(100)
fill(0, 200, 255, 255)
z=0
h=0
t=0
end
-- This function gets called once every frame
function draw()
-- This sets a dark background color
sprite("SpaceCute:Background",512,384,1024,768)
-- This sets the line thickness
strokeWidth(5)
z = z + DeltaTime
text("Hundert: "..math.ceil(h), 500, 200)
text("Tausend: "..math.ceil(t), 500, 300)
text("Time: "..math.ceil(z), WIDTH/2, HEIGHT - 75)
if h % 100 then
h=h-h
t=t+1
end
end
function touched(touch)
if touch.state==BEGAN then
h=h+1
end
end