Dreadleif 4 Posted January 31, 2016 Hello :). I hope someone can help me with this, as I haven't found any clear answers by searching. There are several areas scattered around the map where opfor units might wander off and get stuck, clogging the server. I want to cleanse them. imaginaryscript.sqf For each of the 8 areas, I want to do the following: If opfor units are in area_X, and blufor units are not in area_X, delete units of the side EAST in area_X. Loop every 10 seconds. right now I just have a silly trigger with action: {deleteVehicle _x} forEach thisList; condition: (this (opfor present)) && (!triggeractivated airbase_bluforpresent) But it's totally random and overall bad. :b: Share this post Link to post Share on other sites
davidoss 552 Posted January 31, 2016 Create a trigger on each zone with defined area can be ellipse. Trigger type "Empty" Trigger activation Anybody , Present, repeatable trigger condition this && ({side _x == WEST && _x in thisList} count allunits == 0) on trigger activation { if (alive _x && side _x == EAST && _x in thisList) then { deleteVehicle _x; }; } forEach allUnits; Share this post Link to post Share on other sites
barbolani 198 Posted February 1, 2016 I asume you are trying to build your own spawn system. If so, it is more complex than what you think. For example: what if some areas overlap? What if you conquered the área? What if on an ovelaped área there are spawned defensive BLUFORS which are making not to despawn? Check EOS code which is the first reference to it (but not the best, the best is mine :) ) Share this post Link to post Share on other sites
Dreadleif 4 Posted February 1, 2016 I asume you are trying to build your own spawn system. If so, it is more complex than what you think. For example: what if some areas overlap? What if you conquered the área? What if on an ovelaped área there are spawned defensive BLUFORS which are making not to despawn? Check EOS code which is the first reference to it (but not the best, the best is mine :) ) lol, I will admit it, when I first discarted EOS and thought "nah, I'm big enough to take on this myself!" I may have been a bit overconfident due to recent advances. It's really, really damn hard to make a coherent spawning system, no doubt. The problem is that EOS doesn't fit the kind of map I want to make at all, so I'm kind of forced to make my own.. I'm willing to pay someone right now to make it. The trigger didn't work, Davidoss. Share this post Link to post Share on other sites
f2k sel 164 Posted February 1, 2016 The above won't work as thistrigger should be thislist but also the trigger would need to be set to anybody present I would think script would be easier place in init.sqf or use null=[] execvm "triggers,sqf" place in an init box Add more triggers to the _triggers array as you wish Also set trigger anyone present repeating save as trigger.sqf _triggers = [trig_1,trig_2,trig_3]; while {true} do { sleep 10; { sleep 0.01; if ((west countSide list _x) == 0) then { {if (side _x == EAST) then {deletevehicle _x}} foreach list _x}; } foreach _triggers; }; Share this post Link to post Share on other sites
barbolani 198 Posted February 1, 2016 Well, it took me around 6 months to have a bulletproof spawning system to cover the whole island (around 150 zones if I remember well) which checks in less than a second with very small impact on FPS, and now I can say it is very hard to design one and very easy to implement it. You may unpbo Antistasi and check the script distancias3.sqf which is the begining of everything. Share this post Link to post Share on other sites
davidoss 552 Posted February 2, 2016 The above won't work as thistrigger should be thislist but also the trigger would need to be set to anybody present Right. My bad. Updated my post above Share this post Link to post Share on other sites