jolteon00 10 Posted December 14, 2014 In a current mission I am Making, there is a task where a small force is to clear out a town of say 20 opfor and independent forces, while also treating wounded civilians in the time between, how would I end this task to move on to the next one? I am completely confused on where to go from here, any advice or scripting ideas would be greatly appreciated. Thank you Share this post Link to post Share on other sites
alky_lee 279 Posted December 14, 2014 (edited) If you know how many enemies are put down in the town you can create a trigger to cover the town and count how many enemy are left within the trigger area, so that if they are killed or run away they won't be counted. There's nothing worse than checking every building in a town to find that the last man has run away and is hiding outside the town. The following code will trigger when less than 4 enemy remain within the trigger area. Activation by OPFOR Present CONDITION ({alive _x && side _x == east} count thisList) < 4; Just sync the trigger to a "set task state module" to changed the task's status to succeeded. Edited December 14, 2014 by alky_lee Share this post Link to post Share on other sites
jolteon00 10 Posted December 15, 2014 If you know how many enemies are put down in the town you can create a trigger to cover the town and count how many enemy are left within the trigger area, so that if they are killed or run away they won't be counted. There's nothing worse than checking every building in a town to find that the last man has run away and is hiding outside the town. The following code will trigger when less than 4 enemy remain within the trigger area.Activation by OPFOR Present CONDITION ({alive _x && side _x == east} count thisList) < 4; Just sync the trigger to a "set task state module" to changed the task's status to succeeded. Would I need to do this two times for independant and Opfor factions seperately? Share this post Link to post Share on other sites
jshock 513 Posted December 15, 2014 (edited) Would I need to do this two times for independant and Opfor factions seperately? Yes, but simply: (({alive _x && side _x isEqualTo EAST} count thisList) < 4) && {({alive _x && side _x isEqualTo INDEPENDENT} count thisList) < 4}; Edited December 15, 2014 by JShock Share this post Link to post Share on other sites
MrPineapple 11 Posted December 15, 2014 (edited) ((UNITNAME [url="https://community.bistudio.com/wiki/countEnemy"]countEnemy[/url] thislist) <= 5) && (({side _x == civilian && damage _x <= 0.25} count thislist) == ({side _x == civilian} count thislist)) Name your player unit and use that in place of UNITNAME. Only 5 or less units in the trigger area can be enemy to specified unit. All units in trigger area that are civilian must have health greater/equal to 75%. The trigger activation would be set to 'ANYBODY'. Edited December 15, 2014 by MrPineapple Share this post Link to post Share on other sites