Heaney 11 Posted December 30, 2011 Hello. I want to have a trigger that continuously deletes: Civillians Civillian Vehicles Animals In the triggers area of effect. However, I do NOT want to delete empty Blufor vehicles, but the problem is that empty vehicles are assigned civillian. So basically I tried a continuous trigger with the condition civillian present and the on act being {deleteVehicle _x} forEach thisList But is there any way I can get this to exclude my empty vehicles that I have placed? I think I need to stick something in the empty vehicles' init field to make them excluded, or maybe I can add something to the trigger to exclude them?? Bare in mind there are about 20 vehicles that need to be excluded. Thanks in advance for any help! Share this post Link to post Share on other sites
demonized 20 Posted December 30, 2011 (edited) Edit 2: tested in SinglePlayer civilian present repeated trigger. condition: ({(getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "side")) == 3} count thisList) > 0 on act: { if (!isNull _x AND (getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "side")) == 3) then { if (!(_x isKindOf "Man")) then {{_x setPos (getPos _x); deleteVehicle _x} foreach crew _x}; _x setPos (getPos _x); deleteVehicle _x; }; } foreach thisList; Edit again, added _x setPos (getPos _x); to code outside iskindof check, reason: bus filled with civvis failed to delete all and caused massive FPS drop. Now working without lag. Edited December 30, 2011 by Demonized Share this post Link to post Share on other sites
f2k sel 164 Posted December 30, 2011 close Demonized ;) {if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "side")) == 3) then {_x setPos (getPos _x); deleteVehicle _x}} foreach thisList; 3 = civilian unless there is a typo in yours that I can't see. Share this post Link to post Share on other sites
demonized 20 Posted December 30, 2011 (edited) yeah, i just guessed first with getText civilian instead of number before i checked Six config browser :D Edit: however there was required some additional code since vehicles seems to be taken first in thisList so passengers exited vehicle upon delete and trigger never reactivated, hence the iskindof and crew part of code. And the condition part needed to be so or use a global variable to turn on / off trigger since empty bluefor vehicles registrers as civilian and they also stopped the trigger from reactivating. Edited December 30, 2011 by Demonized Share this post Link to post Share on other sites
Heaney 11 Posted December 30, 2011 It works! It works! Thank you so much Demonized, and F2k Sel! Share this post Link to post Share on other sites
h34dup 147 Posted June 10, 2012 (edited) Old thread, but I just came across this. Thanks! EDIT: Actually, I'm running into some issues with this. It seemed to work the first time I ran it, but then it stopped working and the damn civis got into the area I want to keep them out of. I fiddled with some trigger settings, like setting the activation to Civilian Present, but that only deleted empty objects like furniture (folding tables and chairs, empty cars, etc.). Not sure if it's bc I'm using a custom-made island (shouldn't be an issue), but I had to delete the trigger for now. Edited June 10, 2012 by h34dup Share this post Link to post Share on other sites
cc_kronus 9 Posted January 2, 2013 Sorry for resurrecting this old thread, but after a lot of searching I found it is the only one that nails precisely on the issue I have. This script works well on single player, but unfortunately does not work on a dedicated server and the base gets a lot of civilian vehicles crashing arround with everything. Is there any way to enable this trigger for dedicated servers? Share this post Link to post Share on other sites