trigger conditions are not working

May 08, 2018

I want the success layer ("yes") to show when the user has selected all of the correct shapes, but NOT any other ones. The shapes have two states: normal and selected.

The action triggers when the user has selected all of the correct shapes, whether or not the incorrect shapes are also selected. In other words, the IF conditions in the trigger seem to have no effect.

1 Reply
Steve Bekkala

Hi Beth,

Take a look at the attached .story file -- I believe it exhibits the outcome you're looking to achieve.

The first thing I did here was create a new numeric variable called correct2 which starts out at 0. I then added triggers to each pie slice so that:

  • If you click on any of the (correct) pies between 10 and 3, it adds 1 to correct2
  • If you click again and deselect any of the (correct) pies between 10 and 3, it subtracts 1 back from correct2
  • If you click on any of the (incorrect) pies between 3 and 10, it subtracts 1 from correct2
  • If you click again and deselect any of the (incorrect) pies between 3 and 10, it adds 1 back to correct2

When correct2 = 5 (meaning that all five of the correct pies are selected, and none of the incorrect pies are selected), this triggers the "Yes!" layer to be shown.

I also added another trigger to hide the "Yes!" layer if you then make any changes from the correct state.

This discussion is closed. You can start a new discussion or contact Articulate Support.