Jump to content
Sign in to follow this  
RyanM

removeing un-used units?

Recommended Posts

Ok, so im sure there is a way, and I just have not put in the right keywords into the search function. But how to I remove a unit from the game world? I have this helicopter set up to insert my team then fly away. But I want to remove the unit when it gets to its last waypoint (which happens to be out in the middle of the ocean). There is no point in just having it hover there until it runs out of fuel and crashes. I can turn off the AI but the unit is still there, I want to be able to completely remove it from the game world. Could somebody help me? Or point me in the right direction.

Thanks

Share this post


Link to post
Share on other sites

Thanks. That was surprisingly easier then I thought it would be. lol

Share this post


Link to post
Share on other sites

If I got it right, you want to delete the helicopter and it's crew. The "deleteVehicle" will only remove the chopper but not the crew. To delete chopper and crew I wrote this small script:

_ziel=_this select 0

_crew=crew _ziel
_i = 0
_j = count _crew

#Start
deletevehicle (_crew select _i);
_i=_i+1;
?_j>_i:goto "Start";

deletevehicle _ziel

exit[/Code]
 You can easily execute it at the waypoint or with a trigger.[code][name_of_chopper] exec "delete.sqs"

;)

Edit:

Another way, without scripting, would be to place a trigger, which covers a certain area. Name it "Zone1" and put this in on Act:

{deleteVehicle _x} forEach list Zone1

Edited by IndeedPete

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  

×