trigger with conditions not working correctly

Hello all!

I'm attempting to make a Creative Commons license generator where you select elements of a license and then hit submit to reveal the license in a layer.  I used the trigger to reveal layer when you click a rectangle with conditions.  Those conditions involve the right combination of elements being selected (that is having a state of selected) when the rectangle is clicked.  

Many of the layers, however, will be revealed even when you click submit with an incorrect combination of elements in the selected state.  For example, the zero layer should be revealed ONLY when you have selected the zero element alone.  However, the zero layer appears when the zero element and any other element is selected.  I initially thought I would need to add conditions that all the other elements aside from zero be in the "normal" state but that has not changed anything.

Please find the potential combinations to reveal license layers below.

Please help!  I'm already late on a deadline :(

Many thanks,


4 Replies
Jerry Beaucaire

The ORDER of your triggers matters.  You have a lot of "SHOW LAYER" triggers on the SUBMIT button, I'd think you should order those with the least number of triggers at the top, and the combinations at the bottom.  

It's hard to get SL triggers to behave the way we want in this scenario because SL triggers lack IF/THEN/ELSE logic.  Only IF/THEN.  So all the triggers end up evaluating SEPARATELY in the order you have listed.  It's not uncommon to find a scenario where the individual triggers just won't do what you want in all the possible combinations because you have to list the triggers in you own predetermined order.

But maybe a different approach could solve it for you.  You could give each of the buttons a numeric value.  Then add/subtract those value as the buttons are enabled to get UNIQUE results.

0 = 1pt

With that table you will find that every number from 1 to 31 is UNIQUE and only occurs in one possible combination.  So based on the SUM you keep in a variable, you can choose a specific thing to happen.

1pt = show 0
2pt = Show BY
3pt = show BY (BY+0)
4pt = Show SA (SA only)
5pt = Show SA (SA+0)
6pt = Show BY-SA
7pt = Show BY-SA (BY+SA+0)
8pt = Show ND
9pt = Show ND (ND+0)
10pt = Show BY-ND
11pt = Show BY-ND (BY+ND+0)
12pt = Show ND-SA (this doesn't exist...)
13pt = Show ND-SA (ND+SA+0) (this doesn't exist...)


Anyway, you see how this gives you specific control since you only have to test one variable for it's value one time, then you can do something unique in all possible 31 results.  No problem here with "order" of triggers.