Tile - Loop For – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "Image:Ylands_Tile_-_For_loop.png *This '''loop''' will execute selected instruction sequence as long as a '''counter''' variable ('''I''') is '''within''' the defined '''r...")
 
m (Text replacement - "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}" to "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}")
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Image:Ylands_Tile_-_For_loop.png]]
<!---
*This '''loop''' will execute selected instruction sequence as long as a '''counter''' variable ('''I''') is '''within''' the defined '''range'''.
THIS PAGE WAS GENERATED AUTOMATICALLY; DO NOT EDIT IT, OTHERWISE YOUR CHANGES WILL BE LOST DURING FUTURE UPDATE.
*'''Value''' of current iteration is '''returned''' as '''I''' and can be used as '''local variable''' in instructions inside the loop.
-->
*Loop also support '''negative increments''', so it is possible to perform '''count down''', e.g FROM 10 TO 1 BY -1
== Loop For ==
*'''FROM''', '''TO''' is '''half-closed interval''', it does not include TO value. I ∈ [FROM, TO).
*It is possible to use [[Ylands Tile - Break-Continue|'''break''']] instruction to '''jump out''' of the loop.


=Notes=
[[File:YlandsTile-335.png]]
*See also: [[Ylands Tile - Break-Continue|'''Break / Continue''']].
 
=== Availability ===
 
[[Ylands:Tile Availability - Client|Client]], [[Ylands:Tile Availability - Server|Server]], [[Ylands:Tile Availability - Custom Controller|Custom Controller]]
 
=== Description ===
 
This '''loop''' will execute selected instruction sequence as long as a '''counter''' variable ('''I''') is '''within''' the defined '''range'''.
 
=== Notes ===
 
* '''Value''' of current iteration is '''returned''' as '''I''' and can be used as '''local variable''' in instructions inside the loop.
* Loop also support '''negative increments''', so it is possible to perform '''count down''', e.g FROM 10 TO 1 BY -1.
* '''FROM''', '''TO''' is '''half-closed interval''', it does not include '''TO''' value.




----
----
{{Ylands scripting navbox}}
{{Navbox/Ylands}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}


[[Category: Instructions]]
[[Category: Instructions]]
[[Category: Ylands 0.12]]

Latest revision as of 14:24, 24 November 2023

Loop For

YlandsTile-335.png

Availability

Client, Server, Custom Controller

Description

This loop will execute selected instruction sequence as long as a counter variable (I) is within the defined range.

Notes

  • Value of current iteration is returned as I and can be used as local variable in instructions inside the loop.
  • Loop also support negative increments, so it is possible to perform count down, e.g FROM 10 TO 1 BY -1.
  • FROM, TO is half-closed interval, it does not include TO value.