- wTeams = [];
- rTeams = [];
- eTeams = [];
- _vehicles = configFile >> "CfgVehicles";
- for "_i" from 0 to ((count _vehicles) - 1) do
- {
- _veh = _vehicles select _i;
- if (isClass _veh) then
- {
- if (getNumber (_veh >> "scope") >1) then
- {
- _name = configName _veh;
- if (_name isKindOf "Man") then
- {
- if ((getNumber (_veh >> "side")) == 1) then
- {
- wTeams set [(count wTeams),_name];//西方
- };
- if ((getNumber (_veh >> "side")) == 0) then
- {
- eTeams set [(count eTeams),_name];//东方
- };
- if ((getNumber (_veh >> "side")) == 2) then
- {
- rTeams set [(count rTeams),_name];//叛军
- };
- };
- };
- };
- };
复制代码
以上因为无法过滤非武装人员,蛙人,飞行员,利用阿玛3可以换装的特性也可以读武器config来随机改变所有单位的装备,换装备这方面我不是很懂你得问别人了。
用删除的方法去掉非武装人员:
- _Types = wTeams;
- _pax = 4;//每组人数
- for [{_i=0}, {_i<_pax}, {_i=_i+1}] do
- {
- sleep 0.5;
- _u = _grp createUnit [_Types call BIS_fnc_selectRandom, _pos, [], 0, "FORM"];
-
- if(primaryWeapon _u == "") then
- {
- if(handgunWeapon _u == "") then
- {
- if(secondaryWeapon _u == "") then
- {
- deleteVehicle _u;
- };
- };
- };
- };
复制代码
|