OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: borrowed soap on 20 Jun 2003, 18:24:10

Title: forEach command with @unitReady
Post by: borrowed soap on 20 Jun 2003, 18:24:10
is this right?:

init field of unit:
     sovietA = [sov1,sov2,sov3]  (this part i know works)

in the script:
     _sovietA = _this select 0  (this also has worked for me)
     
     _sovietA commandMove [x,y,x] (this works too)
     
     "@unitReady _x" forEach sovietA
          *this is what is not working*
i get the error message 'invalid number in operation'

not sure about the syntax, or if i can even use the @unitReady command like this, but it is not working.
when i try using the unit command with it:

     "@unitReady _x" forEach unit sovietA

i get the error message 'unknown operator sovietA'

there must b a way to command the sovietA group to wait at the xyz coordinates until the whole group has arrived in formation before moving on. im trying to avoid having to insert a separate line for each unit, as there are many groups in the mission and the task woud b what snYpir rightfully refers to as a Mutha
Title: Re:forEach command with @unitReady
Post by: LCD on 20 Jun 2003, 18:30:55
it shud b

@ "unitReady _x" count sovietA == count sovietA

LCD OUT

shud work but dere may b syntax thingy ;D

LCD OUT
Title: Re:forEach command with @unitReady
Post by: borrowed soap on 20 Jun 2003, 18:44:47
once again u da man   8)