Tile - Loop For Each Array – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
[[Image:Ylands_Tile_-_For_each.png]]
[[Image:Ylands_Tile_-_For_each.png]]
*For each '''loop''' will '''iterate''' trough all the members of selected '''array''' and execute given sequence for each separately.
*For each '''loop''' will '''iterate''' trough all the members of selected '''array''' and execute given sequence for each separately.
*'''Value''' of currently iterated members is '''returned''' as '''item''' and can be used as local variable in instructions inside the loop.
*'''Value''' of currently iterated members is '''returned''' as '''item''' and can be used as '''local variable''' in instructions inside the loop.
*It is possible to use [[Ylands Tile - Break-Continue|'''break''']] instruction to '''jump out''' of the loop.
*It is possible to use [[Ylands Tile - Break-Continue|'''break''']] instruction to '''jump out''' of the loop.



Revision as of 15:50, 12 December 2018

Ylands Tile - For each.png

  • For each loop will iterate trough all the members of selected array and execute given sequence for each separately.
  • Value of currently iterated members is returned as item and can be used as local variable in instructions inside the loop.
  • It is possible to use break instruction to jump out of the loop.

Notes



Template:Ylands scripting navbox