If the counter value is equal or greater than 9, it resets (to zero). The initial value is zero.
This is my script
Code: Select all
function activate()
counter_1:increment()
CellNum = counter_1:getValue()
print(CellNum)
if CellNum>=9 then counter_1:reset() end
endFirst press = 1
Second press = 3
Third press = 5 (and so on)
After the counter resets the value to zero, the first press after this prints the value as 2 [then 4, 6, 8, 10]
After the counter [again] resets (when the value is 9 or greater), the subsequent values are always the even ones, never the odd.
What's going on here?