Forum Discussion
MarineDEMAISON
2 years agoCommunity Member
Count how many objects are in selected state with an incremental variable
Hello, I have an object with a hover / selected state. I've used auto states to select / deselect when I click on an object.
I want to increment a variable when I click on this object to put it in...
MarineDEMAISON
2 years agoCommunity Member
Alright, although I'd love to see the reason why I cannot decrease the counter when the click returns the object to its normal state, I have found a quicker way to do it, by using the else option :
What : Increase the counter variable by one
When : User clicks on object
Condition : if (resultant) state is selected
Else : Decrease the counter variable by one
This creates a counter of how many objects are selected. Maybe there's a quicker way to count objects based on their states ? PLS tell me.