forEach: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
[[Category:Scripting Commands|FOREACH]]
[[Category:Scripting Commands|FOREACH]]
[[Category:Scripting Commands OFP 1.97|FOREACH]]
[[Category:Scripting Commands OFP 1.96|FOREACH]]
[[Category:Scripting Commands OFP 1.46|FOREACH]]
[[Category:Scripting Commands OFP 1.46|FOREACH]]
[[Category:Scripting Commands ArmA|FOREACH]]
[[Category:Scripting Commands ArmA|FOREACH]]

Revision as of 20:19, 1 June 2006


command forEach array


Operand types:

command: String

array: Array

Type of returned value:

Nothing

Description:

Execute given command for each element of array.

It is executed as follows:

For each element of array assign element as _x and execute command.


Example:

"_x setDammage 1" forEach units group player