Jump to content
FunnyCookieEver

Need Help - Trigger countSide Condition

Recommended Posts

I want to make a mission where task is to clear some trigger area. I have always used default trigger options but after some time I noticed, that using | Activation: OPFOR | Condition: Not present | is a very dangerous thing because AI usually hides somewhere inside rocks or other places and player just can't complete the task.

I am trying to use custom condition inside the trigger but no success. Here is my final try:

if (opfor countSide thisList < 3) then {t1_1_1 = true;} else exitWith {};

I have to admit that I'm new in Arma 3 scripting.

Share this post


Link to post
Share on other sites

The condition field only returns a value, usually boolean ("true" or "false"). You don't actually execute code in it, per se.

 

I assume the units and trigger have been placed in the editor? If so:

 

Quote

Activation:
OPFOR
PRESENT

 

Cond:
this && east countSide thisList < 3

 

OnAct:
t1_1_1 = true;

 

Once you have eliminated all but two OPFOR units, the trigger will fire.

  • Like 1

Share this post


Link to post
Share on other sites

That will not solve the problem of hidden units in rocks or decorative houses (with no entry/building positions). They still fires on you.

You could spawn units then delete those inside/below something:

 

_myteam = [_pos, east, _unitsArray , [], [], [], [], [], 0] call BIS_fnc_spawnGroup;
  sleep 0.2;
  {deleteVehicle _x} forEach (units _myteam select {count lineIntersectsSurfaces [getPosWorld _x, getPosWorld _x vectorAdd [0, 0, 10], _x, objNull, true, 1, "GEOM", "VIEW"] >0});

 

 

 

  • Like 3

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

×