Hello,
Get to know the Modulus (Modulo) operator:
- What is the Modulus Operator? A Short Guide with Practical Use Cases | Matthew J. Clemente
- https://processing.org/reference/modulo.html
Example:
You can look up frameCount
in the references; this can be any counter in your code.
:)