mattjb 11 Posted June 12, 2017 Is there a means to count the number of dead units in thisList for a trigger area's condition? Trying, unsuccessfully, with something like: ({!alive _x} count thisList) > 0; Does thisList only count alive units for some reason? Note: Using ACE medical - not sure if this affects anything. Share this post Link to post Share on other sites
Naiss 28 Posted June 15, 2017 Something like this maybe? _Amount = 0; { _Amount = _Amount + 1; } count allDeadMen; hint format ["%1 Dead!",_Amount]; Share this post Link to post Share on other sites
pierremgi 4906 Posted June 16, 2017 In a trigger area, as dead are civilian and you need to react the trigger: place a trigger with your area, none,none, repeatable. on condition field: isNil "trig1" (or any variable name you want) on activation field: hintSilent format ["dead %1",{_x inArea thisTrigger} count allDeadMen]; trig1 = true on deact. field: 0 = [] spawn {sleep 0.5; trig1 = nil}; Here, there is no consideration about side, just a trigger toggling condition true/false with a variable (trig1), to run the code each 0.5 sec. Share this post Link to post Share on other sites
mattjb 11 Posted June 16, 2017 Your logic worked perfectly pierremgi, although I actually ended up taking it a step further in looking for a side-based area trigger for dead units (to simulate an alarm being pulled to trigger reinforcements without relying on eventhandlers) and came up with a combination that appears to be working: Activation: OPFOR Activation type: Present {_x inArea thisTrigger && getNumber (configfile >> "CfgVehicles" >> typeOf _x >> "side") == 0} count allDeadMen > 0; Thanks for the help! :) 1 Share this post Link to post Share on other sites
Tankbuster 1747 Posted June 16, 2017 https://community.bistudio.com/wiki/faction Share this post Link to post Share on other sites
pierremgi 4906 Posted June 17, 2017 5 hours ago, Tankbuster said: https://community.bistudio.com/wiki/faction Yes, but far more complicated with own or modded factions. The getNumber (configfile >> "CfgVehicles" >> typeOf _x >> "side") works fine. Share this post Link to post Share on other sites
Tankbuster 1747 Posted June 17, 2017 You mean 'badly configured factions' ? :) https://community.bistudio.com/wiki/BIS_fnc_objectSide I think this function does more or less the same thing as your getnumber command Share this post Link to post Share on other sites
pierremgi 4906 Posted June 19, 2017 On 16/06/2017 at 10:55 PM, Tankbuster said: You mean 'badly configured factions' ? :) https://community.bistudio.com/wiki/BIS_fnc_objectSide I think this function does more or less the same thing as your getnumber command No, I mean it's easier to cope with 3 or 4 sides instead of 10 or 12 factions due to mods/addons. And your BIS_fnc_objectSide is just using the getnumber... "side" code, with a possible variant of the actual group side. Nothing useful if you know why you're scripting this code instead of the side command ! (like for this dead men trigger). 1 Share this post Link to post Share on other sites