Jump to content
Sign in to follow this  
forzajuve

Majority OPFOR killed

Recommended Posts

What is the best thing to do for this? For example, if BLUFOR is defending a town (staying stationary) and OPFOR is moving in towards them. The best thing I can think of is putting a massive blufor seized trigger over the whole BLUFOR and OPFOR but I think that would still end too quickly. Also if I name the units and do !alive a1 && etc.. that would be too specific if one or two infantry units ran off or didn't move or something...

Any other ideas?

Share this post


Link to post
Share on other sites

There are several ways to accomplish this with a trigger condition, for example with countSide:

(east countSide thislist <= 5)

Another method is to name the enemy groups and count for their strength dropping below a value, for instance when you have five named squads of OPFOR (with statements such as enemysquad1 = group this; in their init line):

({alive _x} count units enemysquad1 <= 2) AND ({alive _x} count units enemysquad2 <= 2) AND ({alive _x} count units enemysquad3 <= 2) AND ({alive _x} count units enemysquad4 <= 2) AND ({alive _x} count units enemysquad5 <= 2)

The latter method has my personal preference above the former: it means all groups have dropped to a minimal strength whereas the former might kick off even when one of the groups with five men in it could still function as a viable combat unit.

Regards,

Sander

Share this post


Link to post
Share on other sites

Is that all for the first condition?

condition:

east countSide thislist <= 5

so if I used that, when there are 5 or less units on OPFOR the trigger would activate?

Share this post


Link to post
Share on other sites

That is correct.

There are some considerations to take into account when setting up a mission. One is that AI units might flee at a certain point and that means one has to account for having the objective tick off within a reasonable margin. By using the count of units on a particular side the game will not distinguish what form these remaining troops have. They might be the lone stragglers of several distinct groups or they might represent a full sized element still capable and willing to continue the fight. For that reason I would recommend using the method in which all enemy groups are named and to check for their size. Squads of 8-10 men reduced to two is generally sufficient in the game to consider them combat ineffective. So with 10 remaining enemies on the map in 5 groups there is less of a threat to the BLUFOR players than when they would represent a 10 man element in one group which could be the case if a countside was done for 10 and below.

Regards,

Sander

Share this post


Link to post
Share on other sites

easy to count enemy units then end if enemy numbers are less then specific number use this as is


while {true} do {


_totalEnemy = {alive _x && side _x == EAST} count allUnits;

        if (_totalEnemy < 11) then  //change here the number of enemy units alive to end mission its set at 11 or below 
       {

            player sidechat format["The enemy are retreating Well done boys", _totalEnemy ];

  	    sleep 30;
            endmission "END2";

       };

sleep 60 // this will check enemy units every 1 minute
};	



---------- Post added at 18:05 ---------- Previous post was at 17:58 ----------

OK so also to include the enemy that are moving away from the task area just create an array of your enemy units and run a distance check on them

and if they are a certain distance away just kill them


        // AO is a variable for thye position the enmy are attacking or target area so place an object down there and name  it AO  or something or even a marker is fine
	 //marker example     _opsAREA = getMarkerPos "yourmarkername";
	 //now change AO to _opsAREA
		 if (_x distance AO <1200) then
	      {



		  } foreach MyEnemyArray; //this is your enemy array


---------- Post added at 18:08 ---------- Previous post was at 18:05 ----------


// AO is a variable for thye position the enmy are attacking or target area so place an object down there and name  it AO  or something or even a marker is fine
	 //marker example     _opsAREA = getMarkerPos "yourmarkername";
	 //now change AO to _opsAREA
		 if (_x distance AO <1200) then
	      {

		  _x setDamage 1; //this will kill them

		  } foreach  units enemysquad2 AND enemysquad3 AND enemysquad4 AND enemysquad5;

Share this post


Link to post
Share on other sites

hmmm I think this one seems fine

east countSide thislist <= x

thanks :)

Share this post


Link to post
Share on other sites

Hey guys! New to these forums (and the editor) and need some help.

({alive _x} count units enemysquad1 <= 2) AND ({alive _x} count units enemysquad2 <= 2) AND ({alive _x} count units enemysquad3 <= 2) AND ({alive _x} count units enemysquad4 <= 2) AND ({alive _x} count units enemysquad5 <= 2)

First of all, what's "_x"? Is that supposed to be the player or the group alive or what?

Also, can I get a little bit of help wif my scripting? I... have no idea what I'm doing... I want the objective to be securing three districts of Chernogorsk (north, mid, south).

I have given each section a variable (northCherno, midCherno, and southCherno).

All three of these are set to north/mid/southCherno = "OPFOR"; to signify that the district is controlled by OpFor.

For the tskobj = "SUCCEEDED"; I will simply put northCherno && midCherno && southCherno = "BLUFOR"; signifying that the sector is controlled by BluFor (in terms of the trigger, that only 4 OpFor in each strike team [enemyNorth, enemyMid, enemySouth] are remaining).

However, I need help with the trigger CONDITION to switch the variables from "OPFOR" to "BLUFOR".

Would the code above work for this?

And will these variables work in the Briefing.sqf that I have set up?

Thanks for any and all help!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×