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

How to write expression in such case - 10 (value at time, green locateion icon)

Enthusiast ,
Feb 03, 2025 Feb 03, 2025

Hi,

I want a specific location icon to start its y axis  animation (math sin) after a certain time period when the first animation ends. So, my first trim path animation ends at 185 frame. (6 sec 5 frame) , I dnt know how can I write the expression to tell the green location icon 'hey green location icon now you start your animation''. please help me. 😥

I can sense that I have to use value at time expression. but what should I write?😥

 

location arrow.gif

 

 

TOPICS
Expressions , How to
499
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

correct answers 1 Correct answer

Community Expert , Feb 04, 2025 Feb 04, 2025

Wow, sorry. That was some bad typing on my part. Try this:

amp = 10;
freq = 1;
tStart = thisComp.layer("excuse line").content("Trim Paths 1").start.key(2).time;
t = Math.max(time - tStart,0);
y = amp*Math.sin(t*freq*Math.PI*2);
value + [0,y]
Translate
Community Expert ,
Feb 03, 2025 Feb 03, 2025

It seems like you should be able to tie it to one of the keyframes you have at that time. Without being able see the way you have it set up exactly, it's hard to know if this is the exact syntax you need, but it's probably going to look like this:

amp = 10;
freq = 1;
tStart = thisComp.layer("excuse line").content("Shape 1").content("Trim Paths 1").end.key(2).time;
t = Math.max(time - tStart,0);
y = amp*Math.sin((t*freq*Mathg.PI*2);
value + [0,y]
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
Enthusiast ,
Feb 04, 2025 Feb 04, 2025

Hi, I could not do it. It shows error. Please help  me. 

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 ,
Feb 04, 2025 Feb 04, 2025

Wow, sorry. That was some bad typing on my part. Try this:

amp = 10;
freq = 1;
tStart = thisComp.layer("excuse line").content("Trim Paths 1").start.key(2).time;
t = Math.max(time - tStart,0);
y = amp*Math.sin(t*freq*Math.PI*2);
value + [0,y]
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
Enthusiast ,
Feb 04, 2025 Feb 04, 2025
LATEST

IT WORKED!!!!!! Thank you so much. 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