fawlty 27 Posted February 2, 2021 Been using this {deleteVehicle _x} forEach nearestObjects [junk_1, ["all"], 150] for cleanup once leaving the area. The 150 is the radius in the trigger that everything gets deleted. I'd like to change that so it's the trigger array instead (don't want drones or aircraft being deleted) Share this post Link to post Share on other sites
beno_83au 1362 Posted February 2, 2021 Hover over the trigger's "On Activation" field and it'll give you some handy variables, one of which is thisList. But also, the ["all"] part could be better adjusted if you wanted to go that way instead. Look at https://community.bistudio.com/wiki/nearestObjects under Types and see the examples for it, because you can filter what you want that way too. 1 1 Share this post Link to post Share on other sites
fawlty 27 Posted February 2, 2021 I kind of worded that wrong. Is there a way of omitting something from that line eg delete everything except aircraft when this trigger fires. Share this post Link to post Share on other sites
beno_83au 1362 Posted February 2, 2021 1 hour ago, fawlty said: This may look familiar to you Beno from a couple of years ago Was that something I wrote? 😂 If it was, I think I may have misused "filter out". But if you want to actually filter out (i.e. ignore) air, you can do: _arr = (nearestObjects [junk_1,["All"],150]) select {!(_x isKindOf "Air)}; That'll give you an array of everything except air. Hopefully that's correct, I've written this from my phone. 1 Share this post Link to post Share on other sites
fawlty 27 Posted February 2, 2021 Ahh you caught that Was that something I wrote?😀 I think I'll pass on trying to get this to do what I want and work around it. I tried different ways of doing what you suggested but with my limited knowledge of this I can't get what I'm after. Thanks anyway. 1 Share this post Link to post Share on other sites
beno_83au 1362 Posted February 2, 2021 Try it like this (plus, I did miss a " in my previous post): _objectsToDelete = (nearestObjects [junk_1,[],150]) select {!(_x isKindOf "Air")}; {deleteVehicle _x} forEach _objectsToDelete; That should remove anything that is a plane/helicopter/UAV. 1 1 Share this post Link to post Share on other sites
fawlty 27 Posted February 3, 2021 Ok Beno, that's got it. Thanks for hanging in there, appreciate it. Cheers...F 2 Share this post Link to post Share on other sites