Hi, thank you very much for this, but I still am having trouble with it.
I am learning so have probably miss interpreted the expression but heres how I make it out. Please tell me where I am going wrong.
You have defined a as the value of the layers rotation property with the line
a=thisComp.layer(“YOUR LAYER”).transform.rotation; in my case the layer name is Arrow so I have he line as
a=thisComp.layer(“Arrow”).transform.rotation;
then with the line: if (a>=360) a=a%360;
You have made a statement saying that if “a” is greater than or equal to 360 the value of “a” will be a % 360.
This makes sense to me as it is making the rotation value remain within the 0 to 360 degree value without the 1x e.t.c
My problem arrises in getting my line in the expression so the arrow will behave how I want it to.
if (rotation<180 || rotation>240) 100 else 50
Currently, if I put this last I get the same problem that the effect only works on one complete cycle.
If I put it first I get an interesting effect (the same thing will occur if I leave out this line altogether) where the arrow starts its cycle at 0% opacity and will slowly fade to 100% opacity at exactly 100 degree rotation.
I can kind of see why this would be, but am unable to find a solution with my current level of skill in expressions. I have tried various things but none seem to work. Would really appreciate the help in this 🙂
PS.. I am applying this to the opacity operator. If I am supposed to apply it to the Rotation operator I also get the problem that my time*60 is ignored or it supercedes the previous expression if applied last.