exec 0 Posted September 7, 2006 Hi. Im working on a mission that requires the players to clear most of a large town occupied with enemy combatants to complete an objective. I want the objective to tick after a certain percentage of enemies are eliminated (Ie. 80%). I thought to see this info posted before, did the search but couldnt find the topic. Any help - much appreciated! Share this post Link to post Share on other sites
kutya 0 Posted September 7, 2006 It should be something like: At the beginning: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_enemyNum = count units Group1 _enemyNum = _enemyNum  + count units Group2 _enemyNum = _enemyNum  + count units Group3 ... _enemyNum = _enemyNum  + count units GroupX And when the mission goes: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #startCheck ~4 _enemyNum = count units Group1 _enemyNum = _enemyNum  + count units Group2 _enemyNum = _enemyNum  + count units Group3 ... _enemyNum = _enemyNum  + count units GroupX ? (_enemyNum/_enemyCount  > 0.2 ) : goto "startCheck" #endMissionPart Put as many groups as you want, but don't forget to define them. 0.2 at the end is if 20% of units still live, the mission will end Share this post Link to post Share on other sites
hardrock 1 Posted September 7, 2006 Use a trigger that covers the town. Condition: true, onActivation: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">EastUnits = []; {if (side _x == east) then {EastUnits=EastUnits+[_x]}} forEach thislist; MinEastAlive = count EastUnits * 0.2 Then you need the end trigger. Condition: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"alive _x" count EastUnits <= MinEastAlive This one should activate once you killed 80%+ of the east units in the trigger on the beginning. Share this post Link to post Share on other sites