Home   Help Search Login Register  

Author Topic: all squads + soldiers in chopper  (Read 1490 times)

0 Members and 1 Guest are viewing this topic.

Offline 456820

  • Contributing Member
  • **
all squads + soldiers in chopper
« on: 21 Dec 2005, 21:38:32 »
how do i check when all squads named (grpalpha, grpbravo and grpcharlie) are in their choppers named (uh601, uh602 and uh603) grpalpha has uh601, grpbravo has uh602 and you should work out which one grpcharlie has

anyway how do i check when all the soldiers of those 3 squads are in their designated chopper then set a variable to true ? (i can do the variable bit but not the first bit)

something like
_x in uh601 foreach units grpalpha
i havent tried it but i dont think its right so i dont see a point of trying

thanks

Offline Pilot

  • Contributing Member
  • **
Re:all squads + soldiers in chopper
« Reply #1 on: 21 Dec 2005, 22:19:46 »
I think you're on the right track.  Something like this should work:
Condition field of trigger:
Code: [Select]
"_x in uh601" foreach units grpalpha and "_x in uh602" foreach units grpbravo and "_x in uh603" foreach units grpcharlie
On Activation:
Code: [Select]
Variable=true
-Pilot

Offline 456820

  • Contributing Member
  • **
Re:all squads + soldiers in chopper
« Reply #2 on: 21 Dec 2005, 22:22:31 »
hey thanks alot ill try that ASAP cheers

edit - just tried and i copied it into my trigger's condition field and got this error
"and: Type Nothing, Expected Bool"

any readon for that ?

i myself cant see anything wrong with the syntax
« Last Edit: 21 Dec 2005, 22:25:50 by 456820 »

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:all squads + soldiers in chopper
« Reply #3 on: 21 Dec 2005, 22:34:16 »
I think you're going to have to write a script.


EDIT: Maybe they need brackets like,

Not (me1 in Uh60)

I don't know, just a thought.
« Last Edit: 21 Dec 2005, 22:35:31 by The-Architect »
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline 456820

  • Contributing Member
  • **
Re:all squads + soldiers in chopper
« Reply #4 on: 21 Dec 2005, 22:40:38 »
cheers Architect ill have a go sometime cant now though but shall tomorow cheers

Offline Pilot

  • Contributing Member
  • **
Re:all squads + soldiers in chopper
« Reply #5 on: 21 Dec 2005, 23:22:37 »
...I just tested my code and it didn't work...strange.  I did find something that I know works, though.  In the On Activation field for the Get In waypoint for grpAlpha, enter:
GrpAlphaIn=true

Do this for the other groups in their Get In waypoints:
GrpBravoIn=true
GrpCharlieIn=true

Then, in a trigger, put the following in the Condition field:
GrpAlphaIn and GrpBravoIn and GrpCharlieIn

On Activation:
Variable=true

-Pilot

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:all squads + soldiers in chopper
« Reply #6 on: 22 Dec 2005, 00:20:03 »
Count, dear boy, count.   What you need is count not forEach

"alive _x" count units grp1 == "_x in chopper1" count units grp1

or something along those lines.
Plenty of reviewed ArmA missions for you to play

Offline Pilot

  • Contributing Member
  • **
Re:all squads + soldiers in chopper
« Reply #7 on: 22 Dec 2005, 01:14:39 »
*casts a sullen look down at feet*
Yes, sir.

 ;D

Thanks for that, Macguba.  I had completely forgotten about count.  What would we poor editors do without you?

-Pilot

Offline 456820

  • Contributing Member
  • **
Re:all squads + soldiers in chopper
« Reply #8 on: 22 Dec 2005, 09:20:40 »
ha ha indeed thanks alot for that Macguba ill try that out before solving the thread
cheers

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re:all squads + soldiers in chopper
« Reply #9 on: 22 Dec 2005, 17:55:45 »
There is also a little helper for this kind of situations in the function library:

groupInVehicle


Offline 456820

  • Contributing Member
  • **
Re:all squads + soldiers in chopper
« Reply #10 on: 22 Dec 2005, 19:11:36 »
cool thanks alot i dont really need it now but it could still come in handy
thanks everyone

topic solved