Home   Help Search Login Register  

Author Topic: defining those dead among an array of units  (Read 997 times)

0 Members and 1 Guest are viewing this topic.

Offline Delta

  • Members
  • *
  • Shazayme, Babye !
defining those dead among an array of units
« on: 16 Jun 2007, 05:05:26 »
Hi guys,


  Having a spot of trouble defining the dead among a group.
Cant seem to sort out who are the multiple dead guys that will be replaced later on.

I need to get a way to define the dead units.

Tried using this below

Code: [Select]
_dead = [a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12]
_found = []

? (!alive _x) then {_found = _found + [_x]} foreach _dead


Any ideas ?

Cheers,

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: defining those dead among an array of units
« Reply #1 on: 16 Jun 2007, 05:48:08 »
1 prob i can think about is ur not putin da code inside brackets 4 da foreach command 2 work

try dat (not tested)

Code: [Select]
_dead = [a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12]
_found = []

{if (! alive _x) then {_found = _found + [_x]}} foreach _dead

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Delta

  • Members
  • *
  • Shazayme, Babye !
Re: defining those dead among an array of units
« Reply #2 on: 16 Jun 2007, 15:56:39 »
LCD, I thank you!!!


  That sorted it right out man.


Much obliged :D

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: defining those dead among an array of units
« Reply #3 on: 16 Jun 2007, 16:20:14 »
 :D  :cool2:

ya welcome

can u translate ur sigi line 4 us not korean/vietnamese speakers ? :D

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta