Home   Help Search Login Register  

Author Topic: ForEach does not work with Move  (Read 545 times)

0 Members and 1 Guest are viewing this topic.

widget

  • Guest
ForEach does not work with Move
« on: 09 Mar 2003, 05:00:47 »
Can anyone answer why this ...
      "_x Move [_xc,_yc]" ForEach _array
doesn't work (none of the units move as required), while this...
      "_x SetDammage 1" ForEach _array
does (all units in the array die).

I have developed a script for making patrol waypoints vary within a specified radius each time the patrol visits them.  This takes away the precise predictability of the route (FP's Placement Radius only randomises once - at the beginning of the mission. After that, the route is predicable again).

It works well with single units, and with groups unless the leader is killed - then all other members halt, rather than continue the patrol.

I'm trying to do the same thing with an array to overcome the group problem.

Any suggestions?

CrashnBurn

  • Guest
Re:ForEach does not work with Move
« Reply #1 on: 09 Mar 2003, 10:02:39 »
For the move command use the group name

Alpha move [0,0,0]

If the leader is killed, the next in line should still follow the command and tell the group to move.