Make Array
Make Array allows for multiple items (for example, numbers, colors, vectors, and so on) to be stored in a single array. Add an item by clicking + and remove it by right-clicking the input name and selecting Remove pin. All data types are supported: Number, Boolean, String, Rect, Vec2, Vec3, Vec4, Color, Texture2D, Scene Object, and Material.
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
In this example, 5 Vec2 items have been stored in an array. Tapping the screen logs a random value from 0 to 4, in turn getting one of the items to be used for the image position.