Skip to main content
Participant
February 26, 2017
Question

Count up, skipping some numbers

  • February 26, 2017
  • 1 reply
  • 4295 views

Hey, I'm still an absolute beginner regarding Ae.
I am trying to create an Count up from -2 to roughly 160. The thing is, I need to skip some numbers. How do I do that?

Thanks a lot!

This topic has been closed for replies.

1 reply

Community Expert
February 26, 2017

The easiest way would be to use an expression on the source text property of a text layer. The math involved depends on how fast you want the counter to go up and which numbers you want to skip. For example if you used this expression you could convert time into frames, then divide the frames by the number of frames you wanted the number to stay the same, then multiply the result by 2. This would give you a count  that was only even numbers -2, 0, 2, 4, 6,  8 and so on. You could then add an if statement to stop the count at 160.

Another option would be to apply Math.Round to the value of a slider and then animate the value of the slider. This will give you whole numbers. You could divide these whole numbers by 2 to give you even numbers or 4 or 3. Then to skip groups of numbers you could add some additional keyframes.

Please give us a detailed explanation of exactly what you are trying to do and we can probably quickly point you to an efficient solution.

seliemAAuthor
Participant
February 26, 2017

Alright, the thing is I want to skip more or less random numbers. I want to skip 1, 2, 154 and some more.

Mylenium
Legend
February 26, 2017

How random is random? Without more info nobody can tell you much. There's a million ways to do this. Code is fluid and many different methods can produce similar results. That said, it seems to me you are overcomplicating this. Counting from -2 to 160 can easily be done using the Numbers effect and skipping any numbers would just be some more keyframes. Perhaps you might care to actually read the help and watch some basics tutorials....

Mylenium