Wiki

Options

Case Status
Log In

Wiki

Options

 
Home ยป Action Reference»Array Actions»Array Get Next
Index
Navigation
Community Wiki

Array Get Next

Each time this action is called it gets the next item from a Array. This lets you quickly loop through all the items of an array to perform actions on them.

Array
The Array Variable to use.
Start Index
From where to start iteration, leave as 0 to start from the beginning
End Index
When to end iteration, leave as 0 to iterate until the end
Loop Event
Event to send to get the next item.
Finished Event
Event to send when there are no more items.
Result
Store the current array item in a variable of the same type.
Current Index
Store the current array index in an int variable.

 

Examples:

In this example we want to run the same set of actions on 4 wheels (GameObjects). First we make a Game Object  Array that contains these wheels. We can then use Array Get Next to loop through them one by one. Each time round, the targeted wheel is stored in a targetWheel variable that can be accessed by other states/actions.

NOTE: You can run through many states in a single update. So you can also think of FSMs like a flow chart with each state describing a step in the process. See Core Concepts.

 

Tags:

Last modified on 1/12/2018 11:09 PM by User.

  • RSS Feed