• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Link layer opacity to more than one dropdown

New Here ,
Jul 26, 2024 Jul 26, 2024

Copy link to clipboard

Copied

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;

TOPICS
Expressions , How to , Scripting

Views

109

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 26, 2024 Jul 26, 2024

Copy link to clipboard

Copied

LATEST

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;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines