Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US :: FAQ
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE AFTER EFFECTS:HomeForumBasicsExpressionsTutorialsPodcastsAE TechniquesCreative Cloud DebateFAQ

If statement only executes once - Expression problem

COW Forums : Adobe After Effects

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Share on Facebook
Respond to this post   •   Return to posts index   •   Read entire thread


Jeo GrekoIf statement only executes once - Expression problem
by on Jul 10, 2012 at 5:47:19 pm

So I am trying to make an expression have an on and off duration, all my math is good as far as I can tell but one of the if conditions only runs once. If I duplicate the if it will work as many times as I copy it, any help is really appreciated.

t = time*24;
period=10;
holdTime=2;
loop=period+holdTime;
if(t>=loop) t=t-loop;
if(t/period>=1) 100 else 0;

The if that doesn't repeat is "if(t>=loop) t=t-loop;" The weird part is the second if will always execute.


Posts IndexRead Thread
Reply   Like  
Share on Facebook


Current Message Thread:




LOGIN TO REPLY



FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2014 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]