OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Arkon on 26 Jun 2007, 19:02:33
-
Hi,
I need to count all the dead bodies in a trigger but to include the bodies from all the sides (West/East/Ind/Civs). I want them all to be placed into one array for further reference in a script... if possible.
To much of a head banger for me, any offers?
Thanks
-
hi Arkon,
Here's how you can get a count of the alive units in a trigger, and i'm guessing substituting "not alive" for "alive in the below script will give you what you are looking for:
To get west, east and civilians you need three triggers, all on this basis:
To get all the East soldiers, create a trigger that runs EAST and PRESENT for the area. name the trigger "triggerEast".
Then in your script put:
_vehListEast = list triggerEast
East_loons = []
{{if (alive _x) then {East_loons = East_loons + [_x]}} forEach crew _x} forEach _vehListEast
-----------------------------------------------
Ok so now East_loons will give you a count of all the East soldiers. I am guessing substituting not alive _x will give you the bodies/body count. Then create two other similar triggers for WEST and Civilians. let me know how that goes
-
Hi Lee,
Thanks for your quick reply, I'll give it a go tonight and get back to you...
Cheers
Arkon
-
check this out too Arkon: http://www.ofpec.com/forum/index.php?topic=29200.0
-
Hi Lee,
Thanks for that, it may well do the trick for me :)
Arkon