Jump to content
Sign in to follow this  
Planetar

Checking the status of enemy vehicles in large area

Recommended Posts

Hey all,

Situation:

In a helicopter mission, I need to check if CSAT vehicles are out of action in a somewhat large area.

Some vehicles are preset placed with the editor and some are added later with BIS_fnc_spawnGroup function. Vehicle types are mixed, some are trucks, some are tanks, and what I want is to check if they are knocked out of action. I am not concerned of infantry, all I want that the vehicles are out.

If I use trigger with not present condition, it also checks for the foot soldiers which is not desirable.

Here is excerpt from the current script running serverside. tgtArea is a invisible helipad in the center of the zone in question.

_array = vehicles; // returns array of all vehicles
waitUntil {
sleep 10;
_num = { canMove _x && side _x == east && (tgtArea distance _x < 800) && _x isKindOf "LandVehicle"} count _array;
_num == 0; 
};

_null = ["Task4", "SUCCEEDED"] spawn BIS_fnc_taskSetState;

["scripts\tsk4Sidechat.sqf","BIS_fnc_execVM",true,false] spawn BIS_fnc_MP; // Sidechat script to clients to report of succesful mission

Is there a better or more elegant solution to this?

Thanks guys

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  

×