Counter
A whole number that goes up, down or back to a start value on triggers.
Parameters
| Name | Type | Description |
|---|---|---|
| Valueoutput | Int | The current count. |
| Step | Int | How much the count changes on each increment or decrement. |
| Increment | Trigger | Adds the step to the count. |
| Decrement | Trigger | Takes the step off the count. |
| Reset | Trigger | Sets the count to the reset value. |
| Reset To | Int | The count after a reset. |
| Limit Range | Bool | Whether the count is kept between a minimum and a maximum. |
| Min | Int | The lowest count allowed. Only present when Limit Range is on. |
| Max | Int | The highest count allowed, included in the range. Only present when Limit Range is on. |
| At Edge | Enum | What happens when the count would leave the range. Only present when Limit Range is on.Choices: Wrap, Stop |
Counter keeps a whole number that triggers move up and down. Every increment adds the step, every decrement takes it off, and a reset puts the count back to the reset value. A negative step turns the two around.
With Limit Range on the count stays between the minimum and the maximum, and both ends are part of the range. Wrap continues from the other end, so counting up past the maximum lands on the minimum again. Stop holds the count at the edge. A reset value outside the range is brought inside in the same way. Turning the limit off hides the minimum, the maximum and the edge choice, and turning it on again brings them back with the values they had.
A common use is stepping through a list of things. A Beat on the increment and a wrapped range from 0 to the last index gives an index that walks through the list in time and starts over at the end.
Keywords: count, increment, decrement, step, index, tally