Created
May 10, 2020 00:16
-
-
Save Saamstep/cc55c9c6bb581999f2cd652a0e2b018b to your computer and use it in GitHub Desktop.
After Effects Countdown timer script (by: tutvid)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rateofSpeed = 1; | |
clockStartTime = thisComp.layer("Timer Duration").effect("Duration")("Slider")*60; | |
function addZero(n) { | |
if(n<10) { return "0" + n } else { return n; } | |
} | |
function noZero(n) { | |
if(n > 0) { return n+":" } else { return "";} | |
} | |
clockTimeNumber = Math.floor(clockStartTime - rateofSpeed*time); | |
minutes = noZero(Math.floor(clockTimeNumber/60)); | |
seconds = clockTimeNumber%60; | |
minutes+addZero(seconds); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment