Index Generator
Outputs a set of numbers within a predefined range. Use Loop mode to cycle through the set based on the Loop Count; Random mode to output randomized values (may repeat); and Shuffle mode to output all values at once (no repetition) in a random order.
Input
Name | Data Type | Description |
---|---|---|
Enter | Exec | The input that triggers this node. |
Reset | Exec | Resets the current index logic. |
From | Number | Minimum value of the index. |
To | Number | Maximum value of the index. |
Mode | String | Loop, Random, or Shuffle. |
Loop Count | Number | Number of cycles. |
Ping-pong | Boolean | When selected, it outputs the set of numbers from the starting value to end value and then backwards. |
Output
Name | Data Type | Description |
---|---|---|
Next | Exec | Executes the next node. |
Index | Number | The output index in between From and To. |
Example
![index generator node](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/index_generator_node-aed60646dcc65a5e4544ab30ff2c5bb7.png)
You can use a Peek node to see if the output number follows the table above.
![index generator logic](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/index_generator_logic-4ed03a92e7314a8a68869b69524ce153.png)
If Loop Count is finite number, for example 1, it will repeat the last one, say 012345555555…
If Loop Count is infinite, which is -1, it will loop forever but for each loop, the play mode will rerun.