Anyone who has studies the 'foreach' command knows that it allows you to easily issue commands for a variety of units/objects without writing out the command for every object.
However, there is no documentation that I can find that tells me if foreach is able to
return values, for instance ....
"_x setdammage 1" forEach units group player
- The line given in the COMREF, gives an order to units in players group.
"getpos _x" forEach units group player
- A command that returns a value, possible?
I would think if it was it would return an array of some sort
I have no idea how to test this and would be quite interested to find this out for my own scripting purposes.