Hey guys,
I'm working on a mission at the minute that is based on a mounted infantry platoon. Basically every element has a Hunter that they should spawn in at mission start.
However, currently all of the unslotted team's hunters also spawn, and will sit there for the rest of the mission, probably most notably is the helos, which 90% of the time will not be slotted. I notice that this doesn't happen from what I've seen in other FA missions. So how do you guys generally clean up any spare vehicles that aren't needed after slotting?
Cleaning up empty vehicles?
- wolfenswan
- Posts: 1209
- Joined: Wed May 25, 2011 4:59 pm
Re: Cleaning up empty vehicles?
You can try putting this into the presence condition field of the hunter:
That would check if the relevant FTL exists and if not, delete the Hunter.
To check for the full group this would work:
That one would spawn the Hunter if at least one member of the entire group is present.
Another option would be to run this at the end of the init.sqf:
VehNATO_Car1 etc. would be the names of the Hunters. This obv. only works if the Hunters are pre-mounted.
Code: Select all
!(isNil "UnitNATO_C1_FTL")
To check for the full group this would work:
Code: Select all
{!(isNil _x)} count ["UnitNATO_C1_FTL","UnitNATO_C1_AR","UnitNATO_C1_AAR","UnitNATO_C1_RAT"] >= 1
Another option would be to run this at the end of the init.sqf:
Code: Select all
if (isServer) then {
{if (count crew _x == 0) then {deleteVehicle _x};} forEach [VehNATO_Car1,VehNATO_Car2]
};
Folk ARPS Mission Making Template & FAQ
Helpful tools and guides for mission-makers
Our home-brewn scripting guides, snippets and more
My ARMA3 Missions - to download select a branch and pick "Download ZIP".
Helpful tools and guides for mission-makers
Our home-brewn scripting guides, snippets and more
My ARMA3 Missions - to download select a branch and pick "Download ZIP".
Re: Cleaning up empty vehicles?
Cheers Wolf,
I hadnt thought about the presence condition box, but of course thats exactly what Im looking for.
I hadnt thought about the presence condition box, but of course thats exactly what Im looking for.