We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm trying to save the time in a variable to use it for a figure to disappear 10 seconds after it appears or disappear randomly. and for every figure that appears on screen.
At the moment It saves the time many times.
""" Mouse Press. Move the mouse to position the shape. Press the mouse button to invert the color. """ #tick=millis() def update_tick(): #text(12) #textAlign(CENTER) pd= millis()/1000 return pd def setup(): global times size(640, 360) noSmooth() fill(126) background(102) times= def draw(): #times= the_time=update_tick() if mousePressed: stroke(255) line(mouseX - 66, mouseY, mouseX + 66, mouseY) line(mouseX, mouseY - 66, mouseX, mouseY + 66) times.append(the_time) print times else: stroke(0)