CarlGustaffa 4 Posted April 14, 2007 Hi In my "learning-to-make-missions" mission, we are flown out by some UH60's. Enroute we pass a convoy on the move just to have something interresting to look at. I now have a two-trigger system that deletes all cargo (a different group moved into a 5t truck), crew, and vehicles. Is it possible through some clever one-liners that can do all of this in one go, on trigger activation? I was thinking in the lines of: {deleteVehicle _x} forEach %Cargo,%Crew, and %Vehicles Those % marks the spot where I'm not getting the syntax correctly, at least not for a oneliner command. As I said, I have a working two-trigger system that works, but doesn't look good , so this is just to feed my curiosity. Edit: Typos Share this post Link to post Share on other sites
shuko 59 Posted April 15, 2007 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> {deletevehicle _x} foreach ([truck] + crew truck) truck is the name given to the vehicle Share this post Link to post Share on other sites
shuko 59 Posted April 15, 2007 Seems to work without naming anything as well... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> {deletevehicle _x} foreach ([thislist select 0] + crew (thislist select 0)) Share this post Link to post Share on other sites
CarlGustaffa 4 Posted April 16, 2007 I made it working as suggested (using the name), but I still have to deal with each separate vehicle. Can I do mulltiple forEach loops within a line? I.e. {_x deleteVehicle} foreach crew {thislist select _y} forEach vehicle thislist??? Have NO idea what such a syntax would be, and I'm getting nowhere. Just for fun though, would be nice to know Edit: Here is one that the engine don't like the syntax of (type code, expected array): This is what I ment with a one-liner; one line to delete all crew in all vehicles, pluss all vehicles. Basically just clear the area. Same goes with dead units if any within the trigger area (another similar problem). <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> {deletevehicle _x} forEach {([thislist select _x] + crew (thislist select _x))} forEach thislist Share this post Link to post Share on other sites
Jedo 10 Posted August 14, 2009 Just wanted to confirm that {deletevehicle _x} foreach ([thislist select 0] + crew (thislist select 0)) seems to have worked for me - three helis are gone like in a Bermuda triangle. Share this post Link to post Share on other sites
Demolition man 10 Posted November 8, 2010 deleteVehicle Cargo && Crew && Vehicle; This is the way I would do it. Share this post Link to post Share on other sites