Skip to main content
Participating Frequently
Sep 20, 2023 2:41 PM UTC
Answered

Setting a delay on an expression for a countdown

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 is closed to new replies. Start a new post to keep the conversation going.
Dan Ebberts
Dan EbbertsCorrect answer
Community Expert
Sep 20, 2023 3:12 PM UTC

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);
}

8 replies

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
Sep 20, 2023 3:12 PM UTC

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);
}
Translate
Participating Frequently
Sep 20, 2023 4:35 PM UTC

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

Translate