What am i doing wrong? Simple expression not working...

Moderators: Disciple, zlovatt

Post Reply
User avatar
mangy_dog
Posts: 1
Joined: August 15th, 2018, 1:00 pm

Im working on a project that has 2 dials. And I want to animate the first dial with key frames and use its values to run a cascade of other things...

The first thing its meant to do is cause dial 2 to chase dial 1s values. An ease in ease out effect.

Ive done this because in software for UIs with simplistic ease. However each attempt of trying to duplicate the method in AEs expressions dont work.

It appears that the expression completely ignores the current or last frame value of the layer the expressions on.
Dial 1 is the RPM the main controller... Speed is dial 2

Code: Select all

speed=this_comp.layer("Speed Dial").transform.rotation; //this I thought captures the current value
rpm=(120/100*(this_comp.layer("RPM Dial").transform.rotation)); // captures current rpm value 

speed+(rpm-speed/10) //This should set the value to 10% closer to the target rpm, in UI runtime this would cause a smooth chasing effect of the changing rpm.
But the expression appears to completely ignore the speed value and just duplicate the rpm value. Ive wasted hours on this one today. Ive even tried putting the speed value into a slider for later reading (in at runtime) still didnt work even tried using thvalueattime subvalue, didnt work...

What am i doing wrong?
CoonKunsen
Posts: 3
Joined: April 25th, 2018, 1:47 am

Hi,

you can't use the word "speed" because it is already used as a AE Property attribute. So you just need to rename your variable to something like "spd" and it will work.
Post Reply