Jump to content
Sign in to follow this  
Blitzer134

delete units arfter leaving help

Recommended Posts

i'll spawn civilians like this

if (!isServer) exitWith {}; 
waituntil {!isnil "bis_fnc_init"};

civ = createGroup east; sleep 0.5;

"O_soldier_TL_F" createUnit [getMarkerPos "spwn1", civ ,"civ _1 = this,0.8, "sergeant"]; sleep 0.5;

how can I delete them when we leave area because only a few will die by a bomber don't want randoms walking around or is there easier ways

Share this post


Link to post
Share on other sites

OK, so not looked yet to see what side each faction is on and I have not tested this method in A3 and just calling it a night so can't test, but you could use something like a trigger around your area with the condition of

WEST countside thislist == 0 && obj1done

assuming you have an objective that completes before you move out and in my case name obj1done.

Then in the on act have

{if (side _x == east AND _x in thisList) then {_x setDamage 1};} foreach thisList;

which would kill the units when you leave the area. There may be better ways of doing it but this should work assuming you have the sides correct.

Share this post


Link to post
Share on other sites

WEST countside thislist == 0 && obj1done

].

Then in the on act have

{if (side _x == east AND _x in thisList) then {_x setDamage 1};} foreach thisList;

.

WEST countside thislist == 0 && !alive ied

not working maybe i'm doing something wrong i'll keep trying after some sleep thanks for help

Share this post


Link to post
Share on other sites

Just did a quick test and working for me, noticed the only thing I forgot to say was change the activation to anybody, if you still can't get it working I will upload a test mission for you

Share this post


Link to post
Share on other sites

What about something basic like this?

while {alive _unit} do

{

if((getMarkerPos "spwn1" distance _unit)>200) _unit setDamage 1;

};

Share this post


Link to post
Share on other sites

@BearBison CHEERS thats perfect the problem was the civies thanks for your help

@sasij thanks

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  

×