Need Help Writing a Trigger Statement

I have 5 variables. Each variable starts with a default but will return a result between 0 & 40. I have 5 corresponding layers and if any ONE variable is greater than any other it will show a specific layer. However, I also have a layer that I want to show when (and here is where I need help):

Show layer called "equal" if any variable is equal to any other variable unless ANY variable is greater than any other (even if there are 2 that are equal to each other).

For example, from this picture, I still want the 'N-High' layer to show and not the equal layer, even though 2 traits are equal.

*Note, the learner can click on the key colors to see any of the other traits.

Ultimately I want the layer to show that has the highest number. But I also want the Equal layer to be an option if the "highest number" are 2 equal traits AND they are higher than any other trait. Currently, if 2 traits are equal and they are both the highest, no layer will show. 

1 Reply
Walt Hamilton

When learner clicks "Time to show Results"

Set Highest to 0

Set HighestScore to blank

Set Equal to 0

set HighestScore to "A"

set Highest to A

Set Equal to "C"

      if C = HighestScore

Set Highest to "C"

     if C > HighestScore

Set HighestScore to C

     if C > HighestScore

Set Equal to "E"

      if E = HighestScore

Set Highest to "E"

     if E > HighestScore

Set HighestScore toE

     if E > HighestScore

Set Equal to "N"

      if N = HighestScore

Set Highest to "N"

     if N > HighestScore

Set HighestScore to  N

     if N > HighestScore

Set Equal to "O"

      if O = HighestScore

Set Highest to "O"

     if O > HighestScore

Set HighestScore to  O

     if O > HighestScore

Here you are expected to show mutually exclusive explanations. For example a layer that closes other layers.  If you need the actual value of the high score, use HighestScore

Show A explanation

     if Highest = "A"

 Show C explanation

     if Highest= "C"

Show E explanation

     if Highest= "E"

Show N explanation

     if Highest= "N"

Show O explanation

     if Highest= "O"

Show equal explanation

     if Equal = Highest

 

This should work if you correct any typos.