ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

can we use 3 "if" value?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ehsan Adham
can we use 3 "if" value?
on Nov 30, 2019 at 6:39:10 pm

Hi everyone

I used this command to say that if the position is less than 500 enter 500 if not 1000
if (transform.xPosition <= 500) {500} else {1000}

How can I do this?:
If it is less than 500, set it to 0
If it is between 5000 & 1000 it should be 1000
else 1500


Return to posts index

Dan Ebberts
Re: can we use 3 "if" value?
on Nov 30, 2019 at 7:40:40 pm

Like this I guess:


if (transform.xPosition < 500)
0
else if (transform.xPosition >= 1000 && transform.xPosition <= 5000)
1000
else
1500;



Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]