@@ -12,32 +12,40 @@ _found = false;
1212
1313_foundVeh = " " ;
1414while {! _found } do {
15- _checked_veh = _cfgVehicles select round (random _realentries ); // RANDOMLY SELECT AN ENTRY
16- _classname = configName _checked_veh ;
17- if (isClass _checked_veh ) then { // CHECK IF THE SELECTED ENTRY IS A CLASS
18- // hintSilent format["%1",_classname];
19- sleep 0.005 ;
20- _actual_vehclass = getText (_checked_veh >> " vehicleClass" );
21- _actual_faction = getText (_checked_veh >> " faction" );
22- _scope = getNumber (_checked_veh >> " scope" ); // check if actually present in editor
23- _simulation_paracheck = getText (_checked_veh >> " simulation" ); // check if not a parachute
24-
25-
26- if (_actual_vehclass == _vehClass && _actual_faction == _faction && _scope ! = 0 && _simulation_paracheck ! = " parachute" ) exitWith {
27- // hintSilent format["%1",_classname];
28- // _veh = createVehicle [_classname, _position, [], 0, _vehClass];
29- _foundVeh = _classname ;
30- _found = true ;
31- };
32- };
33- }; // --- VEHICLE FOUND --> _foundVeh
15+ // RANDOMLY SELECT AN ENTRY
16+ _checked_veh = _cfgVehicles select round (random _realentries );
17+ _classname = configName _checked_veh ;
18+
19+ // CHECK IF THE SELECTED ENTRY IS A CLASS
20+ if (isClass _checked_veh ) then {
21+ // hintSilent format["%1",_classname];
22+ sleep 0.005 ;
23+ _actual_vehclass = getText (_checked_veh >> " vehicleClass" );
24+ _actual_faction = getText (_checked_veh >> " faction" );
25+ _scope = getNumber (_checked_veh >> " scope" ); // check if actually present in editor
26+ _simulation_paracheck = getText (_checked_veh >> " simulation" ); // check if not a parachute
27+ _artilleryScanner = getNumber (_checked_veh >> " artilleryScanner" ); // Check if it is an artillery unit
28+
29+ if (_actual_vehclass == _vehClass
30+ && _actual_faction == _faction
31+ && _scope ! = 0
32+ && _simulation_paracheck ! = " parachute"
33+ && _artilleryScanner == 0 ) exitWith {
34+
35+ // hintSilent format["%1",_classname];
36+ // _veh = createVehicle [_classname, _position, [], 0, _vehClass];
37+ _foundVeh = _classname ;
38+ _found = true ;
39+ };
40+ };
41+ };// --- VEHICLE FOUND --> _foundVeh
3442
3543// DETERMINE LA FACTION
36- _side = EAST ;
37- if (_faction == " BLU_F " ) then {_side = WEST };
38- if (_faction == Opfor_Faction) then {_side = EAST };
39- if (_faction == " IND_F " ) then {_side = RESISTANCE };
40- if (_faction == " CIV_F " ) then {_side = CIVILIAN };
44+ _side = EAST ;
45+ if (_faction == Blufor_Faction ) then {_side = WEST };
46+ if (_faction == Opfor_Faction) then {_side = EAST };
47+ if (_faction == Indfor_Faction ) then {_side = RESISTANCE };
48+ if (_faction == Civilian_Faction ) then {_side = CIVILIAN };
4149
4250_createdVehFnc = [_position ,0 ,_foundVeh ,_side ] call bis_fnc_spawnvehicle ;
4351
0 commit comments