Is it possible to reset frameCount ?

edited October 2015 in Questions about Code

Hello,

I wanted to make this restart from the left side if it reached the other end. frameCount is used to shift the position every frame. Is it possible to reset frameCount to 0 after the x reaches 480 ?

    def draw():
    # Tipp: Die Draw-methode wird in processing in einer endlosschleife aufgerufen
    global prev
    global white
    time = frameCount


    noStroke()
    transparenz = color(white,64)
    fill(transparenz)
    rect(0,0,580,200)
    stroke(0,0,0,255) 
    x = time * 40
    y = 100
    drawSurfer(x,y)

sry for the dumb question, im fairly new to programming

Tagged:

Answers

Sign In or Register to comment.