forEach: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 29: Line 29:
'''Example:'''
'''Example:'''


"'''_x''' [[setDammage]] 1" '''forEach''' [[units grp|units]] [[group]] [[player]]
"'''_x''' [[setDamage]] 1" '''forEach''' [[units grp|units]] [[group]] [[player]]

Revision as of 19:43, 30 July 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 setDamage 1" forEach units group player