Jump to content
davidoss

trigger statements

Recommended Posts

Hi.

 

Need help with trigger statements

 

I have already set:

{_x in thisList } count (playableUnits + switchableUnits) > 0 && {side _x == independent} count thisList == 0

Its works but i need edit this to include dependency that the playable or swichable units are on the ground.

 

something like that:

(getPos _x) select 2 < 1

How to integrate that properly?

Share this post


Link to post
Share on other sites


{(_x in thisList) && (((getPosATL _x) select 2) < 1)} count (playableUnits + switchableUnits) > 0 && {side _x == independent} count thisList == 0

  • Like 1

Share this post


Link to post
Share on other sites

Well i have not much experiences with editor stuff and with their translations it can became big riddle.

 

What i need is that the trigger fire only when the any of players are inside the trigger  with no east side units inside the players need to bee on the ground.

		class Item1
		{
			position[]={9347.1348,118.07443,15906.05};
			a=400;
			b=400;
			activationBy="ANY";
			interruptable=1;
			age="UNKNOWN";
			name="y";
			expCond="{(_x in thisList) && (((getPosATL _x) select 2) < 1)} count (playableUnits + switchableUnits) > 0 && {side _x == east} count thisList == 0";
			expActiv="[[hq_logic_papa,""obj_secure""],""sideRadio"",WEST,false,false] call BIS_fnc_MP; deleteMarker ""x""; deleteVehicle y;";
			class Effects
			{
			};
		};

Do you knew any better solution?

 

Switchable for test it in editor?

Share this post


Link to post
Share on other sites

Just out of curiosity, why do you need playableUnits and switchableUnits?

 

 

Its for both SP and MP compatibility. playableUnits returns a list of all playableUnits in MP but an empty array in SP, vice versa for switchableUnits.

 

In regards to what jsock has written, another way is to write:

((count ((playableUnits + switchableUnits) unitsBelowHeight 1)) > 0) && (({side _x == resistance} count thisList) == 0)

(Uses unitsBelowHeight)

 

Regards,

 

Bull

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

×