-
If(this OR that)… times 5.
I want to have an “OR” in an if/else chain using “||” . My basic setup is that I have an adjustment layer with a fill on it, and in the fill, I have an if/else expression than links to a drop down menu controller. The menu dictates which colors the fill uses, but some menu items use the same RGB values.
So far, here’s my code:
MENU=thisComp.layer("Null 3").effect("Brand Menu")("Menu").value; if(MENU == 1 || 2 || 3 || 4){ [Blue RGBA values] }else if(MENU == 5){ [Yellow RGBA values] }else if(MENU==6 || 7 || 8){ [Orange RGBA values] }else if(MENU==9 || 10 || 11 || 12){ [Red RGBA values] }else if(MENU==14){ value }else{ value }There are no errors on the expression. It returns the proper color for the first menu option, but none of the others. Every menu option shows the same color as the first menu option.
For example, Menu items 1-4 show blue, and while Menu item 5 should show yellow, it shows blue. Menu items 6-8 should show red, but it shows blue. Same with every other menu item. Blue.
What am I missing??