Jump to content
Sign in to follow this  
Cloughy

Deleting objects from a trigger area

Recommended Posts

I want to have some engineers clear a beach, rigging it all with explosives, when it blows, i need to delete the tank traps, and mines, though the mines should explode as well with the force of the explosion.

I pressume it would be something like,

{deleteVehicle _x} forEach Vehicle "Mine" in thislist;

Doesnt seem to like that.

Im sure i have seen how to do this in a prev post, but as usual the search dont seem to fetch owt back.

Cheers

GC

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_mines = nearestObjects [_posOrObj, ["Mine"], _radius];

{

  _xplo = "Sh_122_HE" createVehicle (getPos _x);

  _xplo setPos (getPos _x);

  deleteVehicle _x;

  sleep (random 0.5)

} forEach _mines;

Providing "Mine" is the correct class to search for it should work - not sure if the shell will explode before it is setPos'ed or not, though.

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  

×