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

How to control the starting time in terms of expression?

New Here ,
Jul 15, 2010 Jul 15, 2010

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
781
Translate
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

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

Translate
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

The codes were really very helpful, thak you!

Translate
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

That was helpful, thank you!

Translate
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
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

Translate
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