A counter that adds... and subtracts?

Hi all - this seems like it should be an easy feature, but apparently my brain can't handle variables right now, so I'm looking for some help.

I'd like to create a simple on-screen counter using checkboxes. Basically: have you used the tool listed on the screen? Yes or No. If they click "Used It", then the counter increases by one and they go to the next screen and then asked if they've used another tool. The counter will keep a running total. (I've gotten it to work this far)

Here is my sticking point: If they *accidentally* check "Used It" and then click it again to uncheck it, right now the variable on the checkbox continues to add 1 to the counter (ie: click "Used It" once and you get a running score of "1"... then change your mind and click the "Used It" box to uncheck it, your score goes up to "2" when it should now be equal to "0"). I can't seem to figure out how to add a second condition/variable that will subtract 1 if you click the same checkbox a second time. Suggestions?

8 Replies
Brian Washburn

Thanks Ashley and Michael. I tried Ashley's method which seemed straight forward and I got really excited... except now it's not adding, only subtracting. Grrrrrr.

I'm attaching the file here... am I putting triggers in the wrong order? Would playing around with objects on the timeline make a difference? I've spent some time trying to play with different work-arounds, but would love some thoughts!

Phil Mayor

I prefer Michaels method, but if you use Ashley's method set your condition to evaluate equal to selected and not equal to selected, do not use equal to normal as most states are equal to normal.  You may need to play around with the state conditions as they may be the reverse of what you expect it to be as the trigger may fire before the state change.