Casio91Fin 31 Posted May 5, 2022 hey how does the trigger recognize that half of the enemy has died from this area? Share this post Link to post Share on other sites
dreadedentity 278 Posted May 6, 2022 This is too ambiguous. Are you asking because: You need similar functionality - There are numerous ways to do this You want to know the exact implementation - How would we know? You believe it is not working properly 2 Share this post Link to post Share on other sites
Casio91Fin 31 Posted May 6, 2022 Artificial intelligence spawns a random amount on a task and 50% of that x amount should die before something happens. Share this post Link to post Share on other sites
dreadedentity 278 Posted May 6, 2022 That seems to be more of a statement than a question but I'll respond as if you're asking how to do the above. This ends up being more complex than you'd expect it to be due to the way Arma handles dead; Most of the "allX" commands don't return dead units. And even if you get references to the dead units they are all on CIV side. Fortunately we can get their original side from the config in CfgVehicles The formula to calculate the percentage of dead units would be: number dead / total units So after you put down the trigger edit it's settings to: Type: None Activation: Anybody Activation Type: Present Condition: count (allDeadMen inAreaArray thisTrigger) / count (thisList select {_x isKindOf "Man"}) > 0.5 You have to make sure you are only counting "Men" from thisList (will contain animals eg snakes n stuff) Checking side of dead men can be done in a similar way from config values as mentioned above: (allDeadMen inAreaArray thisTrigger) select {getNumber (configFile >> "CfgVehicles" >> typeOf _x >> "side") == 0} //side == 0 OPFOR //side == 1 BLUFOR //side == 2 GUER //side == 3 CIV (+ animals) I know there's a lot of optimization that can be done, but I'm pretty sure this works and I have to go heheh 😛 Share this post Link to post Share on other sites
pierremgi 4748 Posted May 7, 2022 Using a trigger area (so counting only units inside of it, updating the count) Let the trigger to none none (no matter thisList), repeatable or not, in condition field (say OPFOR are enemies, so you filter "soldierEB" as generic OPFOR unit): _avUnits = entities [["SoldierEB"],[],TRUE,FALSE] select {_x inArea thisTrigger}; {!alive _x} count _avUnits >= {alive _x} count _avUnits; The first par of the condition field is a code for updating enemies inside the trigger, the 2nd part is the condition returning a boolean. Share this post Link to post Share on other sites