One button that increments its own value at each tap

Hi,

I finally found a way to get this : set the On prop to #{@{this} < 4 ? 1+@{this} : 1} . That's if i want to have 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4...

It could have been #{@{this} < 40 ? 10+@{this} : 10} to have 10, 20, 30, 40, 10, 20, 30, 40...

Well... that took me maybe one hour to get there... :woozy_face:
But it's really cool, cause till now i used to set a variable widget to get that...

Before i found this solution, i tried some var setVar locals.var things in the button script field... without success.

So I just wanted to know what would be another way to achieve this.
For learning purpose :wink:

Thanks