Timer Code Not Working
I have been trying to make a timer to make my code pause for two seconds before changing animation frames but I've run into a problem that the code only counts down 1 second before stopping. Chan anyone help me figure out what's wrong with my code? It's in the draw function so it should be updating, right?
timer = 2
if timer > 0 then
timer -= 1/60
else
if startFrame < 7 then
startFrame += 1
timer = 2
else
timer = 0
cutscene = false
end
end