for

From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Armed Assault version 1.00
  

Click on the images for descriptions

Introduced in

Game:
Armed Assault
Version:
1.00

Description

Description:
This operator creates a For Type which is used in the for-constructs (There is the for forspec and the for var syntax available for this construct)

Syntax

Syntax:
for arg
Parameters:
arg: String or Array - When using String it declares the index variable name like "_myVar" and when using Array it must be a 3-dimensional Array of Code
Return Value:
For Type

Examples

Example 1:
for "_i" from 1 to 10 do {debugLog _i;};
Example 2:
for "_i" from 9 to 1 step -2 do {debugLog _i;};
Example 3:
for [{_i=0}, {_i < 10}, {_i = _i + 1}] do {hint str _i};

Additional Information

Multiplayer:
-
See also:
for [ ]for doControl Structures

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes