OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Delta on 16 Jun 2007, 05:05:26

Title: defining those dead among an array of units
Post by: Delta 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,
Title: Re: defining those dead among an array of units
Post by: LCD 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
Title: Re: defining those dead among an array of units
Post by: Delta on 16 Jun 2007, 15:56:39
LCD, I thank you!!!


  That sorted it right out man.


Much obliged :D
Title: Re: defining those dead among an array of units
Post by: LCD 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