Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Subtract 5 from a countdown and then subtract again after 5 seconds

  • Subtract 5 from a countdown and then subtract again after 5 seconds

    Posted by David Adler on October 22, 2017 at 3:12 am

    I want to do a countdown that goes from 100 to 0. But it is not a normal countdown: after 10 frames it subtracts 5 and then, after another 10 frames, it subtracts 5 again. And the cycle repeats. I need an expression to do it for me because the client might want to change it. I’m using the “Numbers” effect from the “Text” section, applied to a solid to make the countdown.

    What expression could I use to make it work?

    Thanks!

    David Adler replied 8 years, 10 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 22, 2017 at 6:25 am

    Try this:

    f = timeToFrames(time);
    100 – Math.min(Math.floor(f/10)*5,100)

    Dan

  • David Adler

    October 22, 2017 at 10:07 pm

    Genius! It worked great.
    Thank you very much.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy