fawlty 27 Posted September 3, 2019 I'm trying to delete all Blufor ground forces via the area inside a trigger zone. I could do this in zeus but using a radio to activate in this situation works better. I found this but it deletes opfor and civilians as well but it's on the right track. cleanUp = (allUnits + vehicles) inAreaArray Trig1; {if ((_x isKindOf "man") || (getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "side")) == 0)then {deleteVehicle _x;};}forEach cleanUp; Any suggestions Share this post Link to post Share on other sites
gokitty1199 225 Posted September 3, 2019 51 minutes ago, fawlty said: I'm trying to delete all Blufor ground forces via the area inside a trigger zone. I could do this in zeus but using a radio to activate in this situation works better. I found this but it deletes opfor and civilians as well but it's on the right track. cleanUp = (allUnits + vehicles) inAreaArray Trig1; {if ((_x isKindOf "man") || (getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "side")) == 0)then {deleteVehicle _x;};}forEach cleanUp; Any suggestions Deletes blufor units and blufor vehicles inside of Trig1 _BluforInTrig = (AllUnits + Vehicles) InAreaArray Trig1;//gets all units and vehicles inside of Trig1 { if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "side")) == 1) then//gets side of _x(unit or vehicle) { DeleteVehicle _x;//if the side is West(1 is equal to West/blufor in this case) then delete it }; } ForEach _BluforInTrig; heres the number equivalent for sides https://community.bistudio.com/wiki/CfgVehicles_Config_Reference#side 2 Share this post Link to post Share on other sites
fawlty 27 Posted September 3, 2019 GK, can I just cut and paste this right into the trigger activation as is? Share this post Link to post Share on other sites
gokitty1199 225 Posted September 3, 2019 19 minutes ago, fawlty said: GK, can I just cut and paste this right into the trigger activation as is? should be able to, if your doing it in the trigger itself, consider using thislist instead of inareaarray Share this post Link to post Share on other sites
fawlty 27 Posted September 3, 2019 No Go GK, I get a error message missing ; when pressing OK for the trigger in the editor I do want to activate the trigger via Radio Bravo Share this post Link to post Share on other sites
gokitty1199 225 Posted September 3, 2019 14 minutes ago, fawlty said: No Go GK, I get a error message missing ; when pressing OK for the trigger in the editor I do want to activate the trigger via Radio Bravo did you remove the comments before pasting it into the trigger in the editor? you cant have //comments in the trigger 1 1 Share this post Link to post Share on other sites
fawlty 27 Posted September 3, 2019 Ok got it, had to lay it out in a text editor to get it and it works as required. "InAreaArray" worked fine Appreciate your patience, Thanks 1 Share this post Link to post Share on other sites