Skip to main content
Participant
July 26, 2024
Question

Link layer opacity to more than one dropdown

  • July 26, 2024
  • 1 reply
  • 322 views

Is it possible to link a Layer’s opacity to more than one dropdown? For example if I want two specific dropdown options to be selected in order for a layer to be visible, what would that code look like?

Right now, it's just tying the opacity to the second dropdown (Team 1) listed below. Any help would be amazing.

 

dropdown = comp("OTR 2024 Score Bug").layer("LEFT/RIGHT").effect("Dropdown Menu Control")("Menu").value;

dropdown==1 ? value : 0;

dropdown = comp("OTR 2024 Score Bug").layer("TEAM").effect("Team 1")("Menu").value;

dropdown==2 ? value : 0;

This topic has been closed for replies.

1 reply

Dan Ebberts
Community Expert
Community Expert
July 26, 2024

I haven't tested this, but if you want both conditions to be true before the layer is visible, I think it would be like this:

dropdown1 = comp("OTR 2024 Score Bug").layer("LEFT/RIGHT").effect("Dropdown Menu Control")("Menu").value;
dropdown2 = comp("OTR 2024 Score Bug").layer("TEAM").effect("Team 1")("Menu").value;
(dropdown1 == 1 && dropdown2 == 2)? value : 0;