Forum Discussion
Advice needed re counting objects
I have an activity (in Storyline 360) that requires counting of objects on an image and displaying a running total each time I click on a unique object. However, if I click on an already selected object, it is counted again, therefore reflecting an inaccurate result in the total number block. How do I change this so that each click is only counted once?
- Thank you for the advice. I edited my trigger (similair to yours) but I added an "if else" condition to "subtract 1" - see screenshot below. 
4 Replies
- MathNotermans-9Community MemberThe amounts of objects defines your solution. With a few objects you can add variables for each Object. Eg. IsObjectselected = 0. When clicked change that variable to 1. Add a condition to your count. If 0 -> add 1, else do nothing. If you have many objects a javascript solution might be better. - LorraineOlip136Community MemberThank you for the tip. 
 
- NedimCommunity MemberThe easiest way to do this is by tracking the object's Visited state. Simply put, if the object is not in the Visited state when clicked, add 1 to the variable. Result: 
- LorraineOlip136Community MemberThank you for the advice. I edited my trigger (similair to yours) but I added an "if else" condition to "subtract 1" - see screenshot below. 
Related Content
- 11 months ago
- 12 months ago
- 10 years ago