Skip to main content
Participating Frequently
September 20, 2023
Answered

Setting a delay on an expression for a countdown

  • September 20, 2023
  • 1 reply
  • 840 views

Hello, I am a newbie when it comes to expression.  I have a piece of code I got from a YouTube video that looks like this:

 

st = 300;
t = st - time;
if (t>599.999) {
c = timeToTimecode(t);
c = c.substring(3,8);
} else
if (t>1) {
c = timeToTimecode(t);
c = c.substring(4,8)
} else {
t = 0
c = timeToTimecode(t);
c = c.substring(4,8);
}

 

But what I want to add is a way to add a delay to the start of the countdown, just like what this guy did with his video.  Electric - 5 Minute Countdown 

 

Also yes, I am using the same effect he is, he made a tutorial video on it, but the video does not include on how to delay the start of the coutndown while keeping the electric animation animating.  How would I do that?

 

If you need to, here's his Tutorial Video 

 

Thank you in advaice for your help.

This topic has been closed for replies.
Correct answer Dan Ebberts

I'm not sure if this is what you're asking for, but this example would delay the countdown for 3 seconds:

delay = 3;
st = 300;
t = time > delay ? st - (time-delay) : st;
if (t>599.999) {
c = timeToTimecode(t);
c = c.substring(3,8);
} else
if (t>1) {
c = timeToTimecode(t);
c = c.substring(4,8)
} else {
t = 0
c = timeToTimecode(t);
c = c.substring(4,8);
}

1 reply

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
September 20, 2023

I'm not sure if this is what you're asking for, but this example would delay the countdown for 3 seconds:

delay = 3;
st = 300;
t = time > delay ? st - (time-delay) : st;
if (t>599.999) {
c = timeToTimecode(t);
c = c.substring(3,8);
} else
if (t>1) {
c = timeToTimecode(t);
c = c.substring(4,8)
} else {
t = 0
c = timeToTimecode(t);
c = c.substring(4,8);
}
Participating Frequently
September 20, 2023

That is EXACTLY what I am looking for, thank you so much.