Checkbox needs to increase and decrease a variable

I am using checkboxes to keep track of the number of items found on a scavenger hunt.

Everytime the user finds an item, they click the checkbox.

These are the triggers I have written on the checkbox:

"Subtract 1.00 from numFound when the user clicks If checkbox's state is equal to Normal"

"Add 1.00 to numFound when the user clicks If checkbox's state is equal to Selected"

The former rule is for when the user untick the checkbox.

When both rules are in place (and irregardless of the order they appear in), only the Subtract rule works, ie numFound keeps decreasing.

What am I doing wrong?

7 Replies
Chris McEwen

Thanks, Rebecca - that's exactly what I have been struggling with!

My project involves giving someone a "badge" when they complete all real life tasks (checking a box for each task completed).

The Badge layer appears on that category's slide when the variable count reaches the required number, and also disappears if boxes are unchecked and decrease the count.  In the end there will be several different badge categories. 

My next goal is to have a separate slide show the list of category badges earned.  I want the badge collection to show each badge in a dimmed state initially and then to change state to normal when the corresponding variable count has met the requirement. 

I have not yet been able to get the state to change at all yet.  I will post my story here and if you have a genius tip for me to do that I would be obliged.

Chris McEwen, Univ of WA

Ashley Terwilliger

Hi Chris and welcome to Heroes!

I took a look at your slide set up, and the problem was that you had set the state of the badge on slide 1.2 to change based on when the variable changed, but that happens on the previous slide. So instead, I changed the trigger to change the state when the timeline starts if countchecked is equal to 3. You also didn't have a trigger to get to that slide, so I added on to ensure the state would change and all worked as expected. I've attached the example I updated here.