Cloughy 0 Posted June 18, 2007 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
HulkingUnicorn 0 Posted June 18, 2007 <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
Cloughy 0 Posted June 20, 2007 Cheers Got it Working, Cloughy Share this post Link to post Share on other sites