JoelObrecht
11 months agoCommunity Member
Increment / decrement a counter based on states
Hello, I have an object with a hover / selected state.
I want to increment a variable when I click on this object to put it in the selected state, and to decrement it when I put the object in the normal state.
My triggers so far :
- +1 when I click, if the state = selected
- -1 when I click, if the state = normal
For it to increment, it seems that I have to use the target state of the click, but the decrementation does not work at all.