Search the Community
Showing results for tags 'vehicle turret index'.
Found 1 result
-
this script relieves all playable units, saves them to a variable and sorts by faction (cfgfactionclass >>displayName). my question is about navigating configfiles, most notably navigating and filtering configs. example say you want to filter out all of the unwanted "man" units like "range master", and "survivor" est. is there a more logical approach to this instead of saying is _unit in [array]? also saving units to variables to be used later. my approach looks weird anybody with the knowhow to guide me in the right direction _cfg = "getnumber( _x >> 'scope' ) isEqualTo 2" configClasses (configFile >> "Cfgvehicles"); for "_i" from 0 to ((count _cfg)-1) do { if (isClass ((_cfg select _i) )) then { _cfgNam = configName (_cfg select _i); _getside = getnumber (configfile >> "Cfgvehicles" >> _cfgNam>> "side"); _getfaction = gettext (configfile >> "Cfgvehicles" >> _cfgNam >> "faction"); _getfac = gettext (configfile >> "cfgfactionclasses" >> _getfaction>> "displayName"); _getSolClas = gettext (configfile >> "Cfgvehicles" >> _cfgNam>> "displayName"); _getvehcat = gettext (configfile >> "Cfgvehicles" >> _cfgNam>> "editorSubcategory"); hint str _getvehcat; if !(_getSolClas in ["Crewman","Officer","Competitor","Pilot","Helicopter Crew","UAV Operator","Survivor","Rifleman (Unarmed)","Assault Diver","Diver Team Leader","Diver Explosive Specialist"]) then { switch _getvehcat do { case ("EdSubcat_Personnel"): {call compile format["missionNamespace setvariable ['man_%1', (missionNamespace getVariable ['man_%1',[]]) + [_cfgNam]];", toupper _getfac];}; case ("EdSubcat_Cars"): {call compile format["missionNamespace setvariable ['car_%1', (missionNamespace getVariable ['car_%1',[]]) + [_cfgNam]];", toupper _getfac];}; case ("EdSubcat_APCs"): {call compile format["missionNamespace setvariable ['apc_%1', (missionNamespace getVariable ['apc_%1',[]]) + [_cfgNam]];", toupper _getfac];}; case ("EdSubcat_Tanks"): {call compile format["missionNamespace setvariable ['tank_%1', (missionNamespace getVariable ['tank_%1',[]]) + [_cfgNam]];", toupper _getfac];};}; }; };}; missionNamespace getVariable "man_NATO";
- 17 replies
-
- script
- vehicle turret index
-
(and 1 more)
Tagged with: