Jump to content
Sign in to follow this  
visiofx

How to Last Player leave Marker distance 500m Ai Delete

Recommended Posts

HI !

When all players within 500m of marker are dead then delete AI

Help ME!

Share this post


Link to post
Share on other sites
_isPlayerHere = false;

{if ((_markerPosition distance _x) <= 500) exitWith {_isPlayerHere = true}} count playableUnits;

if (!_isPlayerHere) then {
{deleteVehicle _x} count (units _aiGroup);

deleteGroup _aiGroup;
};

Share this post


Link to post
Share on other sites
_isPlayerHere = false;

{if ((_markerPosition distance _x) <= 500) exitWith {_isPlayerHere = true}} count playableUnits;

if (!_isPlayerHere) then {
{deleteVehicle _x} count (units _aiGroup);

deleteGroup _aiGroup;
};

Thanks Schatten!

How to use?

Edited by visiofx

Share this post


Link to post
Share on other sites

Try this:

// AI group creating

_markerPosition = getMarkerPos "sy96";

sleep 1000;

_isPlayerHere = false;

{if ((_markerPosition distance _x) <= 500) exitWith {_isPlayerHere = true}} count playableUnits;

if (!_isPlayerHere) then {
{deleteVehicle _x} count (units _aiGroup);

deleteGroup _aiGroup;
};

Edited by Schatten

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  

×