• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to control the starting time in terms of expression?

New Here ,
Jul 15, 2010 Jul 15, 2010

Copy link to clipboard

Copied

Hallo again!

I know there must be some ways to trigger the expression to start not immediately, but at any time I wish.

For e.g. I have here a code:

veloc = 35;

amplitude = 30;

decay = 1.0;

y = amplitude*Math.cos(veloc*time)/Math.exp(decay*time);

value + [0,y]

And I would like to delay the start in 2sek not just by pulling the layer to the right, but to do it in terms of a code.

Could anybody give me a hint?

would be very thankful

TOPICS
Scripting

Views

689

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Jul 15, 2010 Jul 15, 2010

Copy link to clipboard

Copied

See this page for an example that should get you started.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 15, 2010 Jul 15, 2010

Copy link to clipboard

Copied

The codes were really very helpful, thak you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 15, 2010 Jul 15, 2010

Copy link to clipboard

Copied

That was helpful, thank you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 15, 2010 Jul 15, 2010

Copy link to clipboard

Copied

LATEST

I think this is more what you're looking for:

timeToStart = 2;
t = time - timeToStart;
if (t >= 0){
  veloc = 35;
  amplitude = 30;
  decay = 1.0;
  y = amplitude*Math.cos(veloc*t)/Math.exp(decay*t);
}else{
  y = 0;
}
  value + [0,y]

Dan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines