Jump to content

McArcher

Member
  • Content Count

    421
  • Joined

  • Last visited

  • Medals

Posts posted by McArcher


  1. I thought that EH is unique (can be only in one example), and you can overwrite it only... but I haven't tested it yet...

    ---------- Post added at 17:42 ---------- Previous post was at 17:40 ----------

    ou...

    but, here http://community.bistudio.com/wiki/addEventHandler

    is said:

    if you add an event handler of type "killed" and there already exists one, the old one doesn't get overwritten
    ... so I'm wrong...sorry :)

    ---------- Post added at 17:44 ---------- Previous post was at 17:42 ----------

    I think, then you will just add another actions to the EH and they will be executed when EH fires


  2. One small question.

    I want to make Repair Trucks able to build (I will add action not to player, but to the trucks). So, if I must do

    player setvariable [_BIS_COIN_idAction,_action];

    to the user of a truck then should I modify truck's action that way: add a script into truck's action which will:

    1. assign this _BIS_COIN_idAction to the user of a truck

    2. and then call the "scripts\coin\coin_interface.sqf" with my COIN variable as a parameter?

    What should I put into _BIS_COIN_idAction ?


  3. How can I make (by a script) the CDF faction hostile to both WEST and EAST ?

    ---------- Post added at 17:06 ---------- Previous post was at 16:50 ----------

    as I know, setFriend works with side as a parameter, but CDF is not a side, but a faction.

    ---------- Post added at 17:11 ---------- Previous post was at 17:06 ----------

    I use

    tmp_grp = [_x, resistance, _list ] call BIS_fnc_spawnGroup;

    to spawn units from CDF faction, I've created resistance center by

    ResHQ = createCenter resistance;

    publicVariable "ResHQ";

    but CDF units are hostile only to Russian forces (east faction) and friendly to US (west). And wiki says that CDF are west side too...


  4. using BIS_fnc_spawnGroup, my script became 10x shorter :D

    // mca_resistance_init.sqf
    // version 1.0s
    
    if (isServer) then
    {
    mcti_resistance_infantry = [ "CDF_Soldier_Strela", "CDF_Soldier_RPG", "CDF_Soldier_AR", "CDF_Soldier_Engineer", "CDF_Commander", "CDF_Soldier_GL", "CDF_Soldier_MG", "CDF_Soldier_Marksman", "CDF_Soldier_Medic", "CDF_Soldier_Militia", "CDF_Soldier_Officer", "CDF_Soldier", "CDF_Soldier_Sniper", "CDF_Soldier_TL" ];
    mcti_resistance_lightVehicles = [ "UAZ_AGS30_CDF", "UAZ_MG_CDF", "Ural_ZU23_CDF", "BRDM2_CDF", "BRDM2_ATGM_CDF" ];	
    mcti_resistance_heavyVehicles = ["BMP2_CDF", "BMP2_HQ_CDF", "T72_CDF", "ZSU_CDF", "BMP2_Ambul_CDF"];
    publicVariable "mcti_resistance_infantry"; 
    publicVariable "mcti_resistance_lightVehicles"; 
    publicVariable "mcti_resistance_heavyVehicles"; 
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    private ["_i", "_townSize", "_diff", "_cInf", "_cLV", "_cArm", "_list", "_t", "_nInfantry", "_nLightVeh", "_nArmored" ];
    _cInf = count mcti_resistance_infantry - 1;
    _cLV = count mcti_resistance_lightVehicles - 1;
    _cArm = count mcti_resistance_heavyVehicles - 1;
    _diff = mcti_resistance_difficulty; // 1 или 2
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    if (mcti_resistance_enabled) then
    {
    	_i = 0;
    	{
    		// заÑелÑем каждый i-ый город
    		_townSize = mcti_town_sizes select _i;
    		_list = [];
    
    		// numbers of units in town
    		_nInfantry = round (random (_townSize * (_diff * 5 )));
    		_nLightVeh = round (random (_townSize * (_diff * 0.5 )));
    		_nArmored = round (random (_townSize * (_diff * 0.25 )));
    
    		for [{_t=0},{_t<_nInfantry},{_t=_t+1}] do
    		{
    			_list = _list + [ (mcti_resistance_infantry select (round (random _cInf))) ];
    		};
    		for [{_t=0},{_t<_nLightVeh},{_t=_t+1}] do
    		{
    			_list = _list + [ (mcti_resistance_lightVehicles select (round (random _cLV))) ];
    		};
    		for [{_t=0},{_t<_nArmored},{_t=_t+1}] do
    		{
    			_list = _list + [ (mcti_resistance_heavyVehicles select (round (random _cArm))) ];
    		};
    
    		// spawning
    		tmp_grp= [_x, resistance, _list ] call BIS_fnc_spawnGroup;
    		[tmp_grp, _x, _townSize * 50] call BIS_fnc_taskPatrol;
    
    		// Ñледующий город
    		_i = _i + 1;
    		diag_log format["Town #%1 has %2.", _i, _list];/////////////////////
    	} forEach mcti_town_markerCoords;
    
    }; //res enabled
    
    }; //isServer
    

    but still an error File ca\modules\functions\systems\fn_locations.sqf, line 114 appears in BIS's function. However, now crew is inside vehicles and I don't mind that BIS's functions give errors in .rpt. At least, it is not my fault.

    I have a question about BIS_fnc_spawnGroup.

    It is said in the comment in the text of this function's script that third parameter has 3 variants (array , number and....forgot the 3rd), if I choose an array, will it spawn all units, mentioned in array with 100% probability or will it randomly take units from that array?

    ---------- Post added at 16:21 ---------- Previous post was at 15:24 ----------

    and also, the problem of server's FPS arises...

    CPU load on server is only 50-60% (old Athlon 64 X2 @2.0GHz) and 12-14 fps with hundresds of AI at towns total. Why CPU load is not 100% I don't understand. I could understand if 1 core was loalded fully and game was not multi-cpu-friendly.... but BIS say that game is multithreaded and I don't see any of cores fully loaded...let alone all cores loaded.... very strange game engine..


  5. I have even checked compile lines with diag_log...

    // mca_resistance_init.sqf
    // version 1.0s
    
    if (isServer) then
    {
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    
    waitUntil { time > 10};
    
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    
    mcti_resistance_infantry = [ "CDF_Soldier_Strela", "CDF_Soldier_RPG", "CDF_Soldier_AR", "CDF_Soldier_Crew", "CDF_Soldier_Engineer", "CDF_Commander", "CDF_Soldier_GL", "CDF_Soldier_MG", "CDF_Soldier_Marksman", "CDF_Soldier_Medic", "CDF_Soldier_Militia", "CDF_Soldier_Officer", "CDF_Soldier_Pilot", "CDF_Soldier", "CDF_Soldier_Sniper", "CDF_Soldier_Light", "CDF_Soldier_Spotter" ];
    // "CDF_Soldier_TL"
    
    mcti_resistance_lightVehicles = [ "UAZ_AGS30_CDF", "UAZ_MG_CDF", "Ural_ZU23_CDF", "BRDM2_CDF", "BRDM2_ATGM_CDF" ];	
    mcti_resistance_heavyVehicles = ["BMP2_CDF", "BMP2_HQ_CDF", "T72_CDF", "ZSU_CDF", "BMP2_Ambul_CDF"];
    
    mcti_resistance_DriverNeeded = [ "UAZ_AGS30_CDF", "UAZ_MG_CDF", "Ural_ZU23_CDF", "BRDM2_CDF", "BRDM2_ATGM_CDF", "BMP2_CDF", "BMP2_HQ_CDF", "T72_CDF", "ZSU_CDF", "BMP2_Ambul_CDF" ];	
    mcti_resistance_GunnerNeeded = [ "UAZ_AGS30_CDF", "UAZ_MG_CDF", "Ural_ZU23_CDF", "BRDM2_CDF", "BRDM2_ATGM_CDF", "BMP2_CDF", "BMP2_HQ_CDF", "T72_CDF", "ZSU_CDF" ];
    mcti_resistance_CommNeeded = [ "T72_CDF" ];
    
    publicVariable "mcti_resistance_infantry"; 
    publicVariable "mcti_resistance_lightVehicles"; 
    publicVariable "mcti_resistance_heavyVehicles"; 
    
    publicVariable "mcti_resistance_DriverNeeded"; 
    publicVariable "mcti_resistance_GunnerNeeded"; 
    publicVariable "mcti_resistance_CommNeeded"; 
    
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    
    mcti_res_groups = []; publicVariable "mcti_res_groups";
    mcti_res_units = []; publicVariable "mcti_res_units";
    mcti_res_vehicles = []; publicVariable "mcti_res_vehicles";
    
    mcti_res_group_prefix = "mcti_res_group_";
    mcti_res_unit_prefix = "mcti_res_unit_";
    mcti_res_vehicle_prefix = "mcti_res_vehicle_";
    
    //global counters
    gc_u = 0;
    gc_v = 0;
    
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    
    private ["_i", "_xf", "_yf", "_townSize", "_diff", "_radiusMax", "_radius", "_angle", "_povorot", "_nInfantry", "_nLightVeh", "_nArmored", "_cInf", "_cLV", "_cArm", "_j", "_DriverNeeded", "_vehClass", "_unitCountTown", "_unitCountTotal", "_pos", "_lvCount", "_hvCount", "_driversCount", "_gunnersCount", "_commCount", "_varName", "_groupName" , "_s"];
    
    _cInf = count mcti_resistance_infantry - 1;
    _cLV = count mcti_resistance_lightVehicles - 1;
    _cArm = count mcti_resistance_heavyVehicles - 1;
    _diff = mcti_resistance_difficulty; // 1 или 2
    _unitCountTotal = 0;
    _lvCount = 0;
    _hvCount = 0;
    _driversCount = 0;
    _gunnersCount = 0;
    _commCount = 0;
    
    if (mcti_resistance_enabled) then
    {
    	_i = 0;
    	{
    		// заÑелÑем каждый i-ый город
    		// new group
    		tmp_group = createGroup resistance; 
    		_varName = mcti_res_group_prefix + (str _i);
    		_groupName = _varName;
    		_s = Format ["%1=tmp_group; PublicVariable ""%1""; mcti_res_groups = mcti_res_groups + [%1];",_varName]; // mcti_res_group_* = tmp_group; (* = _i)
    		Call Compile _s;
    		diag_log _s;/////////////////////////////////////////
    
    		_unitCountTown = 0;
    		_xf = _x select 0;
    		_yf = _x select 1; // X,Y координаты флага города
    		_townSize = mcti_town_sizes select _i;
    		_radiusMax = _townSize * 80; //метров
    
    		// numbers of units in town
    		_nInfantry = round (random (_townSize * (_diff * 3 )));
    		_nLightVeh = round (random (_townSize * (_diff * 1.0 )));
    		_nArmored = round (random (_townSize * (_diff * 0.75 )));
    		// placing Infantry
    		for [{_j=0},{_j<_nInfantry},{_j=_j+1}] do
    		{
    			_unitCountTown = _unitCountTown + 1;
    			_radius = round (random _radiusMax);
    			_angle = random (2 * pi);
    			_povorot = random (2 * pi);
    			_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			while {surfaceIsWater _pos} do 
    			{
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			};
    			_s = Format ["    tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, %1, """", (0.5 + 0.1 * _diff * _diff)];        ",   _groupName   ];
    			Call Compile _s;
    			diag_log _s;/////////////////////////////////////////
    			_varName = mcti_res_unit_prefix + (str gc_u);
    			gc_u = gc_u + 1;
    			tmp_unit SetVehicleVarName _varName;
    			_s = Format ["%1=_this; PublicVariable ""%1""; mcti_res_units = mcti_res_units + [%1];",_varName]; // mcti_res_unit_* = tmp_unit;
    			tmp_unit Call Compile _s;
    			diag_log _s;/////////////////////////////////////////
    			_s = Format ["   	 %1 setDir (deg _povorot); [%1] joinSilent %2; if (_j == 0) then { %2 selectLeader %1  }; %1 disableAI ""AUTOTARGET""; %1 disableAI ""TARGET""; %1 disableAI ""MOVE""; 	 ", _varName, mcti_res_group_prefix + (str _i)];	
    			Call Compile _s;
    			diag_log _s;/////////////////////////////////////////
    
    		};
    
    		// placing Light Vehicles
    		for [{_j=0},{_j<_nLightVeh},{_j=_j+1}] do
    		{
    			_unitCountTown = _unitCountTown + 1;
    			_lvCount = _lvCount + 1;
    			_radius = round (random _radiusMax);
    			_angle = random (2 * pi);
    			_povorot = random (2 * pi);
    			_vehClass = (mcti_resistance_lightVehicles select (round (random _cLV))); 
    			_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			while {surfaceIsWater _pos} do 
    			{
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			};
    			tmp_veh = _vehClass createVehicle _pos;
    			_varName = mcti_res_vehicle_prefix + (str gc_v);
    			gc_v = gc_v + 1;
    			tmp_veh SetVehicleVarName _varName;
    			_s = Format ["%1=_this; PublicVariable ""%1""; mcti_res_vehicles = mcti_res_vehicles + [%1];",_varName]; // mcti_res_vehicle_* = tmp_veh;
    			tmp_veh Call Compile _s;
    			diag_log _s;/////////////////////////////////////////
    			_s = Format [" %1 setDir (deg _povorot);  ", _varName];
    			Call Compile _s;
    			diag_log _s;/////////////////////////////////////////	
    
    			//driver
    			if (_vehClass in mcti_resistance_DriverNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_driversCount = _driversCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				// _pos from LV
    				_s = Format ["    tmp_unit =  ""Ins_Soldier_Crew"" createUnit [ _pos, %1, """", (0.5 + 0.1 * _diff * _diff)];        ",   _groupName   ];
    				Call Compile _s;
    				diag_log _s;/////////////////////////////////////////	
    				_varName = mcti_res_unit_prefix + (str gc_u);
    				gc_u = gc_u + 1;
    				tmp_unit SetVehicleVarName _varName;
    				_s = Format ["%1=_this; PublicVariable ""%1""; mcti_res_units = mcti_res_units + [%1];",_varName]; // mcti_res_unit_* = tmp_unit;
    				tmp_unit Call Compile _s;
    				diag_log _s;/////////////////////////////////////////	
    				_s = Format ["    %1 setDir (deg _povorot); [%1] joinSilent %2; %1 assignAsDriver (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [%1] orderGetIn TRUE; %1 disableAI ""AUTOTARGET""; %1 disableAI ""TARGET""; %1 disableAI ""MOVE"";     ", _varName, mcti_res_group_prefix + (str _i)];
    				Call Compile _s;
    				diag_log _s;/////////////////////////////////////////	
    				//tmp_unit moveInDriver tmp_veh; 	
    
    			};
    
    			//gunner
    			if (_vehClass in mcti_resistance_GunnerNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_gunnersCount = _gunnersCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				// _pos from LV
    				_s = Format ["    tmp_unit =  ""Ins_Soldier_Crew"" createUnit [ _pos, %1, """", (0.5 + 0.1 * _diff * _diff)];        ",   _groupName   ];
    				Call Compile _s;
    				diag_log _s;/////////////////////////////////////////	
    				_varName = mcti_res_unit_prefix + (str gc_u);
    				gc_u = gc_u + 1;
    				tmp_unit SetVehicleVarName _varName;
    				_s = Format ["%1=_this; PublicVariable ""%1""; mcti_res_units = mcti_res_units + [%1];",_varName]; // mcti_res_unit_* = tmp_unit;
    				tmp_unit Call Compile _s;
    				diag_log _s;/////////////////////////////////////////	
    				_s = Format ["    %1 setDir (deg _povorot); [%1] joinSilent %2; %1 assignAsGunner (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [%1] orderGetIn TRUE; %1 disableAI ""AUTOTARGET""; %1 disableAI ""TARGET""; %1 disableAI ""MOVE"";     ", _varName, mcti_res_group_prefix + (str _i)];
    				Call Compile _s;
    				diag_log _s;/////////////////////////////////////////	
    				//tmp_unit2 moveInGunner tmp_veh; 
    
    			};
    		};
    
    		// placing Heavy Vehicles
    		for [{_j=0},{_j<_nArmored},{_j=_j+1}] do
    		{
    			_unitCountTown = _unitCountTown + 1;
    			_hvCount = _hvCount + 1;
    			_radius = round (random _radiusMax);
    			_angle = random (2 * pi);
    			_povorot = random (2 * pi);
    			_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			while {surfaceIsWater _pos} do 
    			{
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			};
    			_vehClass = (mcti_resistance_heavyVehicles select (round (random _cArm)));
    			tmp_veh = _vehClass createVehicle _pos;
    			_varName = mcti_res_vehicle_prefix + (str gc_v);
    			gc_v = gc_v + 1;
    			tmp_veh SetVehicleVarName _varName;
    			_s = Format ["%1=_this; PublicVariable ""%1""; mcti_res_vehicles = mcti_res_vehicles + [%1];",_varName]; // mcti_res_vehicle_* = tmp_veh;
    			tmp_veh Call Compile _s;
    			diag_log _s;/////////////////////////////////////////	
    			_s = Format [" %1 setDir (deg _povorot);  ", _varName];
    			Call Compile _s;
    			diag_log _s;/////////////////////////////////////////	
    
    			//driver
    			if (_vehClass in mcti_resistance_DriverNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_driversCount = _driversCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				//_pos from HV
    				_s = Format ["    tmp_unit =  ""Ins_Soldier_Crew"" createUnit [ _pos, %1, """", (0.5 + 0.1 * _diff * _diff)];        ",   _groupName   ];
    				Call Compile _s;
    				diag_log _s;/////////////////////////////////////////	
    				_varName = mcti_res_unit_prefix + (str gc_u);
    				gc_u = gc_u + 1;
    				tmp_unit SetVehicleVarName _varName;
    				_s = Format ["%1=_this; PublicVariable ""%1""; mcti_res_units = mcti_res_units + [%1];",_varName]; // mcti_res_unit_* = tmp_unit;
    				tmp_unit Call Compile _s;
    				diag_log _s;/////////////////////////////////////////	
    				_s = Format ["    %1 setDir (deg _povorot); [%1] joinSilent %2; %1 assignAsDriver (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [%1] orderGetIn TRUE; %1 disableAI ""AUTOTARGET""; %1 disableAI ""TARGET""; %1 disableAI ""MOVE"";     ", _varName, mcti_res_group_prefix + (str _i)];
    				Call Compile _s;
    				diag_log _s;/////////////////////////////////////////	
    				//tmp_unit moveInDriver tmp_veh; 	
    
    			};
    
    			//gunner
    			if (_vehClass in mcti_resistance_GunnerNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_gunnersCount = _gunnersCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				//_pos from HV
    				_s = Format ["    tmp_unit =  ""Ins_Soldier_Crew"" createUnit [ _pos, %1, """", (0.5 + 0.1 * _diff * _diff)];        ",   _groupName   ];
    				Call Compile _s;
    				diag_log _s;/////////////////////////////////////////	
    				_varName = mcti_res_unit_prefix + (str gc_u);
    				gc_u = gc_u + 1;
    				tmp_unit SetVehicleVarName _varName;
    				_s = Format ["%1=_this; PublicVariable ""%1""; mcti_res_units = mcti_res_units + [%1];",_varName]; // mcti_res_unit_* = tmp_unit;
    				tmp_unit Call Compile _s;
    				diag_log _s;/////////////////////////////////////////	
    				_s = Format ["    %1 setDir (deg _povorot); [%1] joinSilent %2; %1 assignAsGunner (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [%1] orderGetIn TRUE; %1 disableAI ""AUTOTARGET""; %1 disableAI ""TARGET""; %1 disableAI ""MOVE"";     ", _varName, mcti_res_group_prefix + (str _i)];
    				Call Compile _s;
    				diag_log _s;/////////////////////////////////////////	
    				//tmp_unit2 moveInGunner tmp_veh; 
    
    			};
    
    			//commander
    			if (_vehClass in mcti_resistance_CommNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_commCount = _commCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				//_pos from HV
    				_s = Format ["    tmp_unit =  ""Ins_Soldier_Crew"" createUnit [ _pos, %1, """", (0.5 + 0.1 * _diff * _diff)];        ",   _groupName   ];
    				Call Compile _s;
    				diag_log _s;/////////////////////////////////////////	
    				_varName = mcti_res_unit_prefix + (str gc_u);
    				gc_u = gc_u + 1;
    				tmp_unit SetVehicleVarName _varName;
    				_s = Format ["%1=_this; PublicVariable ""%1""; mcti_res_units = mcti_res_units + [%1];",_varName]; // mcti_res_unit_* = tmp_unit;
    				tmp_unit Call Compile _s;
    				diag_log _s;/////////////////////////////////////////	
    				_s = Format ["    %1 setDir (deg _povorot); [%1] joinSilent %2; %1 assignAsCommander (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [%1] orderGetIn TRUE; %1 disableAI ""AUTOTARGET""; %1 disableAI ""TARGET""; %1 disableAI ""MOVE"";     ", _varName, mcti_res_group_prefix + (str _i)];
    				Call Compile _s;
    				diag_log _s;/////////////////////////////////////////	
    				//tmp_unit2 moveInGunner tmp_veh; 
    
    			};
    
    		};
    
    		// Ñледующий город
    		_unitCountTotal = _unitCountTotal + _unitCountTown;
    		_i = _i + 1;
    	} forEach mcti_town_markerCoords;
    
    	publicVariable "mcti_res_groups";
    	publicVariable "mcti_res_units";
    	publicVariable "mcti_res_vehicles";
    
    }; //res enabled
    
    diag_log "________________________________________________________";
    diag_log format["Total Units: %1, Light Vehicles: %2, Heavy Vehicles: %3, Drivers: %4, Gunners: %5, Commanders: %6", _unitCountTotal, _lvCount, _hvCount, _driversCount, _gunnersCount, _commCount]; //dbg////////
    
    }; //isServer
    

    .RPT:

    Mods: CA

    Distribution: 0

    2010/01/08, 0:17:28 Unsupported language Russian in stringtable

    2010/01/08, 0:18:03 Error in expression <e _area == typename []) then {_position distance _center < _maxdis} else {[_area>

    2010/01/08, 0:18:03 Error position: <distance _center < _maxdis} else {[_area>

    2010/01/08, 0:18:03 Error distance: Тип ЧиÑло, ожидаетÑÑ ÐœÐ½Ð¾Ð¶ÐµÑтво,Объект,Location

    2010/01/08, 0:18:03 File ca\modules\functions\systems\fn_locations.sqf, line 114

    2010/01/08, 0:18:21 Server: Update of object 2:35 arrived from nonowner

    2010/01/08, 0:18:29 "mcti_res_group_0=tmp_group; PublicVariable "mcti_res_group_0"; mcti_res_groups = mcti_res_groups + [mcti_res_group_0];"

    2010/01/08, 0:18:29 " tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, mcti_res_group_0, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:18:29 "mcti_res_unit_0=_this; PublicVariable "mcti_res_unit_0"; mcti_res_units = mcti_res_units + [mcti_res_unit_0];"

    2010/01/08, 0:18:29 " mcti_res_unit_0 setDir (deg _povorot); [mcti_res_unit_0] joinSilent mcti_res_group_0; if (_j == 0) then { mcti_res_group_0 selectLeader mcti_res_unit_0 }; mcti_res_unit_0 disableAI "AUTOTARGET"; mcti_res_unit_0 disableAI "TARGET"; mcti_res_unit_0 disableAI "MOVE"; "

    2010/01/08, 0:18:29 "mcti_res_vehicle_0=_this; PublicVariable "mcti_res_vehicle_0"; mcti_res_vehicles = mcti_res_vehicles + [mcti_res_vehicle_0];"

    2010/01/08, 0:18:29 " mcti_res_vehicle_0 setDir (deg _povorot); "

    2010/01/08, 0:18:29 " tmp_unit = "Ins_Soldier_Crew" createUnit [ _pos, mcti_res_group_0, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:18:29 "mcti_res_unit_1=_this; PublicVariable "mcti_res_unit_1"; mcti_res_units = mcti_res_units + [mcti_res_unit_1];"

    2010/01/08, 0:18:29 " mcti_res_unit_1 setDir (deg _povorot); [mcti_res_unit_1] joinSilent mcti_res_group_0; mcti_res_unit_1 assignAsDriver (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [mcti_res_unit_1] orderGetIn TRUE; mcti_res_unit_1 disableAI "AUTOTARGET"; mcti_res_unit_1 disableAI "TARGET"; mcti_res_unit_1 disableAI "MOVE"; "

    2010/01/08, 0:18:29 " tmp_unit = "Ins_Soldier_Crew" createUnit [ _pos, mcti_res_group_0, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:18:29 "mcti_res_unit_2=_this; PublicVariable "mcti_res_unit_2"; mcti_res_units = mcti_res_units + [mcti_res_unit_2];"

    2010/01/08, 0:18:29 " mcti_res_unit_2 setDir (deg _povorot); [mcti_res_unit_2] joinSilent mcti_res_group_0; mcti_res_unit_2 assignAsGunner (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [mcti_res_unit_2] orderGetIn TRUE; mcti_res_unit_2 disableAI "AUTOTARGET"; mcti_res_unit_2 disableAI "TARGET"; mcti_res_unit_2 disableAI "MOVE"; "

    2010/01/08, 0:18:29 "mcti_res_vehicle_1=_this; PublicVariable "mcti_res_vehicle_1"; mcti_res_vehicles = mcti_res_vehicles + [mcti_res_vehicle_1];"

    2010/01/08, 0:18:29 " mcti_res_vehicle_1 setDir (deg _povorot); "

    2010/01/08, 0:18:29 " tmp_unit = "Ins_Soldier_Crew" createUnit [ _pos, mcti_res_group_0, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:18:29 "mcti_res_unit_3=_this; PublicVariable "mcti_res_unit_3"; mcti_res_units = mcti_res_units + [mcti_res_unit_3];"

    2010/01/08, 0:18:29 " mcti_res_unit_3 setDir (deg _povorot); [mcti_res_unit_3] joinSilent mcti_res_group_0; mcti_res_unit_3 assignAsDriver (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [mcti_res_unit_3] orderGetIn TRUE; mcti_res_unit_3 disableAI "AUTOTARGET"; mcti_res_unit_3 disableAI "TARGET"; mcti_res_unit_3 disableAI "MOVE"; "

    2010/01/08, 0:18:29 " tmp_unit = "Ins_Soldier_Crew" createUnit [ _pos, mcti_res_group_0, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:18:29 "mcti_res_unit_4=_this; PublicVariable "mcti_res_unit_4"; mcti_res_units = mcti_res_units + [mcti_res_unit_4];"

    2010/01/08, 0:18:29 " mcti_res_unit_4 setDir (deg _povorot); [mcti_res_unit_4] joinSilent mcti_res_group_0; mcti_res_unit_4 assignAsGunner (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [mcti_res_unit_4] orderGetIn TRUE; mcti_res_unit_4 disableAI "AUTOTARGET"; mcti_res_unit_4 disableAI "TARGET"; mcti_res_unit_4 disableAI "MOVE"; "

    2010/01/08, 0:18:29 "mcti_res_vehicle_2=_this; PublicVariable "mcti_res_vehicle_2"; mcti_res_vehicles = mcti_res_vehicles + [mcti_res_vehicle_2];"

    2010/01/08, 0:18:29 " mcti_res_vehicle_2 setDir (deg _povorot); "

    2010/01/08, 0:18:29 " tmp_unit = "Ins_Soldier_Crew" createUnit [ _pos, mcti_res_group_0, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:18:29 "mcti_res_unit_5=_this; PublicVariable "mcti_res_unit_5"; mcti_res_units = mcti_res_units + [mcti_res_unit_5];"

    2010/01/08, 0:18:29 " mcti_res_unit_5 setDir (deg _povorot); [mcti_res_unit_5] joinSilent mcti_res_group_0; mcti_res_unit_5 assignAsDriver (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [mcti_res_unit_5] orderGetIn TRUE; mcti_res_unit_5 disableAI "AUTOTARGET"; mcti_res_unit_5 disableAI "TARGET"; mcti_res_unit_5 disableAI "MOVE"; "

    2010/01/08, 0:18:29 " tmp_unit = "Ins_Soldier_Crew" createUnit [ _pos, mcti_res_group_0, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:18:29 "mcti_res_unit_6=_this; PublicVariable "mcti_res_unit_6"; mcti_res_units = mcti_res_units + [mcti_res_unit_6];"

    2010/01/08, 0:18:29 " mcti_res_unit_6 setDir (deg _povorot); [mcti_res_unit_6] joinSilent mcti_res_group_0; mcti_res_unit_6 assignAsGunner (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [mcti_res_unit_6] orderGetIn TRUE; mcti_res_unit_6 disableAI "AUTOTARGET"; mcti_res_unit_6 disableAI "TARGET"; mcti_res_unit_6 disableAI "MOVE"; "

    2010/01/08, 0:18:29 "mcti_res_group_1=tmp_group; PublicVariable "mcti_res_group_1"; mcti_res_groups = mcti_res_groups + [mcti_res_group_1];"

    2010/01/08, 0:18:29 " tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, mcti_res_group_1, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:18:29 "mcti_res_unit_7=_this; PublicVariable "mcti_res_unit_7"; mcti_res_units = mcti_res_units + [mcti_res_unit_7];"

    2010/01/08, 0:18:29 " mcti_res_unit_7 setDir (deg _povorot); [mcti_res_unit_7] joinSilent mcti_res_group_1; if (_j == 0) then { mcti_res_group_1 selectLeader mcti_res_unit_7 }; mcti_res_unit_7 disableAI "AUTOTARGET"; mcti_res_unit_7 disableAI "TARGET"; mcti_res_unit_7 disableAI "MOVE"; "

    2010/01/08, 0:18:29 " tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, mcti_res_group_1, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:18:29 "mcti_res_unit_8=_this; PublicVariable "mcti_res_unit_8"; mcti_res_units = mcti_res_units + [mcti_res_unit_8];"

    2010/01/08, 0:18:29 " mcti_res_unit_8 setDir (deg _povorot); [mcti_res_unit_8] joinSilent mcti_res_group_1; if (_j == 0) then { mcti_res_group_1 selectLeader mcti_res_unit_8 }; mcti_res_unit_8 disableAI "AUTOTARGET"; mcti_res_unit_8 disableAI "TARGET"; mcti_res_unit_8 disableAI "MOVE"; "

    2010/01/08, 0:18:29 " tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, mcti_res_group_1, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:18:29 "mcti_res_unit_9=_this; PublicVariable "mcti_res_unit_9"; mcti_res_units = mcti_res_units + [mcti_res_unit_9];"

    2010/01/08, 0:18:29 " mcti_res_unit_9 setDir (deg _povorot); [mcti_res_unit_9] joinSilent mcti_res_group_1; if (_j == 0) then { mcti_res_group_1 selectLeader mcti_res_unit_9 }; mcti_res_unit_9 disableAI "AUTOTARGET"; mcti_res_unit_9 disableAI "TARGET"; mcti_res_unit_9 disableAI "MOVE"; "

    2010/01/08, 0:18:30 "mcti_res_vehicle_3=_this; PublicVariable "mcti_res_vehicle_3"; mcti_res_vehicles = mcti_res_vehicles + [mcti_res_vehicle_3];"

    [ several hundreds thousands characters here]

    2010/01/08, 0:18:33 "mcti_res_unit_66=_this; PublicVariable "mcti_res_unit_66"; mcti_res_units = mcti_res_units + [mcti_res_unit_66];"

    2010/01/08, 0:18:33 " mcti_res_unit_66 setDir (deg _povorot); [mcti_res_unit_66] joinSilent mcti_res_group_5; if (_j == 0) then { mcti_res_group_5 selectLeader mcti_res_unit_66 }; mcti_res_unit_66 disableAI "AUTOTARGET"; mcti_res_unit_66 disableAI "TARGET"; mcti_res_unit_66 disableAI "MOVE"; "

    2010/01/08, 0:18:34 " tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, mcti_res_group_5, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:18:34 "mcti_res_unit_67=_this; PublicVariable "mcti_res_unit_67"; mcti_res_units = mcti_res_units + [mcti_res_unit_67];"

    2010/01/08, 0:18:34 " mcti_res_unit_67 setDir (deg _povorot); [mcti_res_unit_67] joinSilent mcti_res_group_5; if (_j == 0) then { mcti_res_group_5 selectLeader mcti_res_unit_67 }; mcti_res_unit_67 disableAI "AUTOTARGET"; mcti_res_unit_67 disableAI "TARGET"; mcti_res_unit_67 disableAI "MOVE"; "

    2010/01/08, 0:18:34 "mcti_res_vehicle_17=_this; PublicVariable "mcti_res_vehicle_17"; mcti_res_vehicles = mcti_res_vehicles + [mcti_res_vehicle_17];"

    2010/01/08, 0:18:34 " mcti_res_vehicle_17 setDir (deg _povorot); "

    2010/01/08, 0:18:34 " tmp_unit = "Ins_Soldier_Crew" createUnit [ _pos, mcti_res_group_5, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:18:34 "mcti_res_unit_68=_this; PublicVariable "mcti_res_unit_68"; mcti_res_units = mcti_res_units + [mcti_res_unit_68];"

    2010/01/08, 0:18:34 " mcti_res_unit_68 setDir (deg _povorot); [mcti_res_unit_68] joinSilent mcti_res_group_5; mcti_res_unit_68 assignAsDriver (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [mcti_res_unit_68] orderGetIn TRUE; mcti_res_unit_68 disableAI "AUTOTARGET"; mcti_res_unit_68 disableAI "TARGET"; mcti_res_unit_68 disableAI "MOVE"; "

    [ several hundreds thousands characters here]

    2010/01/08, 0:19:22 "mcti_res_vehicle_116=_this; PublicVariable "mcti_res_vehicle_116"; mcti_res_vehicles = mcti_res_vehicles + [mcti_res_vehicle_116];"

    2010/01/08, 0:19:22 " mcti_res_vehicle_116 setDir (deg _povorot); "

    2010/01/08, 0:19:22 " tmp_unit = "Ins_Soldier_Crew" createUnit [ _pos, mcti_res_group_52, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:19:22 "mcti_res_unit_460=_this; PublicVariable "mcti_res_unit_460"; mcti_res_units = mcti_res_units + [mcti_res_unit_460];"

    2010/01/08, 0:19:22 " mcti_res_unit_460 setDir (deg _povorot); [mcti_res_unit_460] joinSilent mcti_res_group_52; mcti_res_unit_460 assignAsDriver (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [mcti_res_unit_460] orderGetIn TRUE; mcti_res_unit_460 disableAI "AUTOTARGET"; mcti_res_unit_460 disableAI "TARGET"; mcti_res_unit_460 disableAI "MOVE"; "

    2010/01/08, 0:19:22 "mcti_res_group_53=tmp_group; PublicVariable "mcti_res_group_53"; mcti_res_groups = mcti_res_groups + [mcti_res_group_53];"

    2010/01/08, 0:19:22 " tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, mcti_res_group_53, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:19:22 "mcti_res_unit_461=_this; PublicVariable "mcti_res_unit_461"; mcti_res_units = mcti_res_units + [mcti_res_unit_461];"

    2010/01/08, 0:19:22 " mcti_res_unit_461 setDir (deg _povorot); [mcti_res_unit_461] joinSilent mcti_res_group_53; if (_j == 0) then { mcti_res_group_53 selectLeader mcti_res_unit_461 }; mcti_res_unit_461 disableAI "AUTOTARGET"; mcti_res_unit_461 disableAI "TARGET"; mcti_res_unit_461 disableAI "MOVE"; "

    2010/01/08, 0:19:22 " tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, mcti_res_group_53, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:19:22 "mcti_res_unit_462=_this; PublicVariable "mcti_res_unit_462"; mcti_res_units = mcti_res_units + [mcti_res_unit_462];"

    2010/01/08, 0:19:22 " mcti_res_unit_462 setDir (deg _povorot); [mcti_res_unit_462] joinSilent mcti_res_group_53; if (_j == 0) then { mcti_res_group_53 selectLeader mcti_res_unit_462 }; mcti_res_unit_462 disableAI "AUTOTARGET"; mcti_res_unit_462 disableAI "TARGET"; mcti_res_unit_462 disableAI "MOVE"; "

    2010/01/08, 0:19:22 " tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, mcti_res_group_53, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:19:22 "mcti_res_unit_463=_this; PublicVariable "mcti_res_unit_463"; mcti_res_units = mcti_res_units + [mcti_res_unit_463];"

    2010/01/08, 0:19:22 " mcti_res_unit_463 setDir (deg _povorot); [mcti_res_unit_463] joinSilent mcti_res_group_53; if (_j == 0) then { mcti_res_group_53 selectLeader mcti_res_unit_463 }; mcti_res_unit_463 disableAI "AUTOTARGET"; mcti_res_unit_463 disableAI "TARGET"; mcti_res_unit_463 disableAI "MOVE"; "

    2010/01/08, 0:19:22 " tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, mcti_res_group_53, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:19:22 "mcti_res_unit_464=_this; PublicVariable "mcti_res_unit_464"; mcti_res_units = mcti_res_units + [mcti_res_unit_464];"

    2010/01/08, 0:19:22 " mcti_res_unit_464 setDir (deg _povorot); [mcti_res_unit_464] joinSilent mcti_res_group_53; if (_j == 0) then { mcti_res_group_53 selectLeader mcti_res_unit_464 }; mcti_res_unit_464 disableAI "AUTOTARGET"; mcti_res_unit_464 disableAI "TARGET"; mcti_res_unit_464 disableAI "MOVE"; "

    2010/01/08, 0:19:23 " tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, mcti_res_group_53, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:19:23 "mcti_res_unit_465=_this; PublicVariable "mcti_res_unit_465"; mcti_res_units = mcti_res_units + [mcti_res_unit_465];"

    2010/01/08, 0:19:23 " mcti_res_unit_465 setDir (deg _povorot); [mcti_res_unit_465] joinSilent mcti_res_group_53; if (_j == 0) then { mcti_res_group_53 selectLeader mcti_res_unit_465 }; mcti_res_unit_465 disableAI "AUTOTARGET"; mcti_res_unit_465 disableAI "TARGET"; mcti_res_unit_465 disableAI "MOVE"; "

    2010/01/08, 0:19:23 " tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, mcti_res_group_53, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:19:23 "mcti_res_unit_466=_this; PublicVariable "mcti_res_unit_466"; mcti_res_units = mcti_res_units + [mcti_res_unit_466];"

    2010/01/08, 0:19:23 " mcti_res_unit_466 setDir (deg _povorot); [mcti_res_unit_466] joinSilent mcti_res_group_53; if (_j == 0) then { mcti_res_group_53 selectLeader mcti_res_unit_466 }; mcti_res_unit_466 disableAI "AUTOTARGET"; mcti_res_unit_466 disableAI "TARGET"; mcti_res_unit_466 disableAI "MOVE"; "

    2010/01/08, 0:19:23 " tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, mcti_res_group_53, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:19:23 "mcti_res_unit_467=_this; PublicVariable "mcti_res_unit_467"; mcti_res_units = mcti_res_units + [mcti_res_unit_467];"

    2010/01/08, 0:19:23 " mcti_res_unit_467 setDir (deg _povorot); [mcti_res_unit_467] joinSilent mcti_res_group_53; if (_j == 0) then { mcti_res_group_53 selectLeader mcti_res_unit_467 }; mcti_res_unit_467 disableAI "AUTOTARGET"; mcti_res_unit_467 disableAI "TARGET"; mcti_res_unit_467 disableAI "MOVE"; "

    2010/01/08, 0:19:23 " tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, mcti_res_group_53, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:19:23 "mcti_res_unit_468=_this; PublicVariable "mcti_res_unit_468"; mcti_res_units = mcti_res_units + [mcti_res_unit_468];"

    2010/01/08, 0:19:23 " mcti_res_unit_468 setDir (deg _povorot); [mcti_res_unit_468] joinSilent mcti_res_group_53; if (_j == 0) then { mcti_res_group_53 selectLeader mcti_res_unit_468 }; mcti_res_unit_468 disableAI "AUTOTARGET"; mcti_res_unit_468 disableAI "TARGET"; mcti_res_unit_468 disableAI "MOVE"; "

    2010/01/08, 0:19:23 " tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, mcti_res_group_53, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:19:23 "mcti_res_unit_469=_this; PublicVariable "mcti_res_unit_469"; mcti_res_units = mcti_res_units + [mcti_res_unit_469];"

    2010/01/08, 0:19:23 " mcti_res_unit_469 setDir (deg _povorot); [mcti_res_unit_469] joinSilent mcti_res_group_53; if (_j == 0) then { mcti_res_group_53 selectLeader mcti_res_unit_469 }; mcti_res_unit_469 disableAI "AUTOTARGET"; mcti_res_unit_469 disableAI "TARGET"; mcti_res_unit_469 disableAI "MOVE"; "

    2010/01/08, 0:19:23 "mcti_res_vehicle_117=_this; PublicVariable "mcti_res_vehicle_117"; mcti_res_vehicles = mcti_res_vehicles + [mcti_res_vehicle_117];"

    2010/01/08, 0:19:23 " mcti_res_vehicle_117 setDir (deg _povorot); "

    2010/01/08, 0:19:23 " tmp_unit = "Ins_Soldier_Crew" createUnit [ _pos, mcti_res_group_53, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:19:23 "mcti_res_unit_470=_this; PublicVariable "mcti_res_unit_470"; mcti_res_units = mcti_res_units + [mcti_res_unit_470];"

    2010/01/08, 0:19:23 " mcti_res_unit_470 setDir (deg _povorot); [mcti_res_unit_470] joinSilent mcti_res_group_53; mcti_res_unit_470 assignAsDriver (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [mcti_res_unit_470] orderGetIn TRUE; mcti_res_unit_470 disableAI "AUTOTARGET"; mcti_res_unit_470 disableAI "TARGET"; mcti_res_unit_470 disableAI "MOVE"; "

    2010/01/08, 0:19:24 " tmp_unit = "Ins_Soldier_Crew" createUnit [ _pos, mcti_res_group_53, "", (0.5 + 0.1 * _diff * _diff)]; "

    2010/01/08, 0:19:24 "mcti_res_unit_471=_this; PublicVariable "mcti_res_unit_471"; mcti_res_units = mcti_res_units + [mcti_res_unit_471];"

    2010/01/08, 0:19:24 " mcti_res_unit_471 setDir (deg _povorot); [mcti_res_unit_471] joinSilent mcti_res_group_53; mcti_res_unit_471 assignAsGunner (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [mcti_res_unit_471] orderGetIn TRUE; mcti_res_unit_471 disableAI "AUTOTARGET"; mcti_res_unit_471 disableAI "TARGET"; mcti_res_unit_471 disableAI "MOVE"; "

    2010/01/08, 0:19:24 "________________________________________________________"

    2010/01/08, 0:19:24 "Total Units: 590, Light Vehicles: 66, Heavy Vehicles: 52, Drivers: 118, Gunners: 112, Commanders: 18"

    2010/01/08, 0:21:02 Client: Object 3:3 (type Type_67) not found.

    2010/01/08, 0:21:02 Client: Object 3:3 (type Type_66) not found.

    2010/01/08, 0:21:18 Server: Object 3:4 not found (message 121)

    I can see units, but vehicles are empty, crew is walking around..

    Code seems to be ok....

    ---------- Post added at 01:41 ---------- Previous post was at 01:28 ----------

    G'day you could use these scripts instead or have a look

    http://forums.bistudio.com/showthread.php?t=92851&highlight=wolffy.au

    This is version 0.5 and do'es what you ask whith the crB-spawnCrew.sqf

    Version 0.6 is nearly ready for release and will support all sides and factions.

    Ok, thanx. I'll read about these BIS functions....


  6. second version of this script, optimized

    * added groups, 1 group per town

    * changed to assignAs*** commands

    * _pos of crew is now same _pos as vehicle's

    * waiting for game to start and last for 10 seconds (i thought that was the problem, but not this..... :( )

    but drivers/gunners/commanders still stand near vehicles and don't get in them... and error again (at the end of message).

    Please help! What is wrong here? I think someone has already been using spawning many AIs via script and had same error before. Share your experience please.

    // mca_resistance_init.sqf
    // version 1.0s
    
    if (isServer) then
    {
    waitUntil { time > 10};
    
    mcti_resistance_infantry = [ "CDF_Soldier_Strela", "CDF_Soldier_RPG", "CDF_Soldier_AR", "CDF_Soldier_Crew", "CDF_Soldier_Engineer", "CDF_Commander", "CDF_Soldier_GL", "CDF_Soldier_MG", "CDF_Soldier_Marksman", "CDF_Soldier_Medic", "CDF_Soldier_Militia", "CDF_Soldier_Officer", "CDF_Soldier_Pilot", "CDF_Soldier", "CDF_Soldier_Sniper", "CDF_Soldier_Light", "CDF_Soldier_Spotter" ];
    // "CDF_Soldier_TL"
    
    mcti_resistance_lightVehicles = [ "UAZ_AGS30_CDF", "UAZ_MG_CDF", "Ural_ZU23_CDF", "BRDM2_CDF", "BRDM2_ATGM_CDF" ];	
    mcti_resistance_heavyVehicles = ["BMP2_CDF", "BMP2_HQ_CDF", "T72_CDF", "ZSU_CDF", "BMP2_Ambul_CDF"];
    
    mcti_resistance_DriverNeeded = [ "UAZ_AGS30_CDF", "UAZ_MG_CDF", "Ural_ZU23_CDF", "BRDM2_CDF", "BRDM2_ATGM_CDF", "BMP2_CDF", "BMP2_HQ_CDF", "T72_CDF", "ZSU_CDF", "BMP2_Ambul_CDF" ];	
    mcti_resistance_GunnerNeeded = [ "UAZ_AGS30_CDF", "UAZ_MG_CDF", "Ural_ZU23_CDF", "BRDM2_CDF", "BRDM2_ATGM_CDF", "BMP2_CDF", "BMP2_HQ_CDF", "T72_CDF", "ZSU_CDF" ];
    mcti_resistance_CommNeeded = [ "T72_CDF" ];
    
    publicVariable "mcti_resistance_infantry"; 
    publicVariable "mcti_resistance_lightVehicles"; 
    publicVariable "mcti_resistance_heavyVehicles"; 
    
    publicVariable "mcti_resistance_DriverNeeded"; 
    publicVariable "mcti_resistance_GunnerNeeded"; 
    publicVariable "mcti_resistance_CommNeeded"; 
    
    private ["_i", "_xf", "_yf", "_townSize", "_diff", "_radiusMax", "_radius", "_angle", "_povorot", "_nInfantry", "_nLightVeh", "_nArmored", "_cInf", "_cLV", "_cArm", "_j", "_DriverNeeded", "_vehClass", "_unitCountTown", "_unitCountTotal", "_pos", "_lvCount", "_hvCount", "_driversCount", "_gunnersCount", "_commCount"];
    _cInf = count mcti_resistance_infantry - 1;
    _cLV = count mcti_resistance_lightVehicles - 1;
    _cArm = count mcti_resistance_heavyVehicles - 1;
    _diff = mcti_resistance_difficulty; // 1 или 2
    _unitCountTotal = 0;
    _lvCount = 0;
    _hvCount = 0;
    _driversCount = 0;
    _gunnersCount = 0;
    _commCount = 0;
    
    if (mcti_resistance_enabled) then
    {
    	_i = 0;
    	{
    		// заÑелÑем каждый i-ый город
    		// new group
    		tmp_group = createGroup resistance; 
    
    		_unitCountTown = 0;
    		_xf = _x select 0;
    		_yf = _x select 1; // X,Y координаты флага города
    		_townSize = mcti_town_sizes select _i;
    		_radiusMax = _townSize * 80; //метров
    
    		// numbers of units in town
    		_nInfantry = round (random (_townSize * (_diff * 3 )));
    		_nLightVeh = round (random (_townSize * (_diff * 1.0 )));
    		_nArmored = round (random (_townSize * (_diff * 0.75 )));
    		// placing Infantry
    		for [{_j=0},{_j<_nInfantry},{_j=_j+1}] do
    		{
    			_unitCountTown = _unitCountTown + 1;
    			_radius = round (random _radiusMax);
    			_angle = random (2 * pi);
    			_povorot = random (2 * pi);
    			_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			while {surfaceIsWater _pos} do 
    			{
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			};
    			tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, tmp_group, "", (0.5 + 0.1 * _diff * _diff)];
    			tmp_unit setDir (deg _povorot); 
    			[tmp_unit] joinSilent tmp_group; 
    			if (_j == 0) then { tmp_group selectLeader tmp_unit  };
    			tmp_unit disableAI "AUTOTARGET"; 
    			tmp_unit disableAI "TARGET"; 
    			tmp_unit disableAI "MOVE"; 
    		};
    
    		// placing Light Vehicles
    		for [{_j=0},{_j<_nLightVeh},{_j=_j+1}] do
    		{
    			_unitCountTown = _unitCountTown + 1;
    			_lvCount = _lvCount + 1;
    			_radius = round (random _radiusMax);
    			_angle = random (2 * pi);
    			_povorot = random (2 * pi);
    			_vehClass = (mcti_resistance_lightVehicles select (round (random _cLV))); 
    			_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			while {surfaceIsWater _pos} do 
    			{
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			};
    			tmp_veh = _vehClass createVehicle _pos;
    			tmp_veh setDir (deg _povorot); 
    
    			//driver
    			if (_vehClass in mcti_resistance_DriverNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_driversCount = _driversCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				// _pos from LV
    				tmp_unit = "Ins_Soldier_Crew" createUnit [ _pos, tmp_group, "", (0.5 + 0.1 * _diff * _diff)];
    				tmp_unit setDir (deg _povorot); 
    				[tmp_unit] joinSilent tmp_group; 
    				//tmp_unit moveInDriver tmp_veh; 
    				tmp_unit assignAsDriver tmp_veh;
    				[tmp_unit] orderGetIn TRUE;
    				tmp_unit disableAI "AUTOTARGET"; 
    				tmp_unit disableAI "TARGET"; 
    				tmp_unit disableAI "MOVE"; 
    			};
    
    			//gunner
    			if (_vehClass in mcti_resistance_GunnerNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_gunnersCount = _gunnersCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				// _pos from LV
    				tmp_unit2 = "Ins_Soldier_Crew" createUnit [ _pos, tmp_group, "", (0.5 + 0.1 * _diff * _diff)];
    				tmp_unit2 setDir (deg _povorot); 
    				[tmp_unit2] joinSilent tmp_group; 
    				//tmp_unit2 moveInGunner tmp_veh; 
    				tmp_unit2 assignAsGunner tmp_veh;
    				[tmp_unit2] orderGetIn TRUE;
    				tmp_unit2 disableAI "AUTOTARGET"; 
    				tmp_unit2 disableAI "TARGET"; 
    				tmp_unit2 disableAI "MOVE"; 
    			};
    		};
    
    		// placing Heavy Vehicles
    		for [{_j=0},{_j<_nArmored},{_j=_j+1}] do
    		{
    			_unitCountTown = _unitCountTown + 1;
    			_hvCount = _hvCount + 1;
    			_radius = round (random _radiusMax);
    			_angle = random (2 * pi);
    			_povorot = random (2 * pi);
    			_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			while {surfaceIsWater _pos} do 
    			{
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			};
    			_vehClass = (mcti_resistance_heavyVehicles select (round (random _cArm)));
    			tmp_veh = _vehClass createVehicle _pos;
    			tmp_veh setDir (deg _povorot); 
    
    			//driver
    			if (_vehClass in mcti_resistance_DriverNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_driversCount = _driversCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				//_pos from HV
    				tmp_unit = "Ins_Soldier_Crew" createUnit [ _pos, tmp_group, "", (0.5 + 0.1 * _diff * _diff)];
    				tmp_unit setDir (deg _povorot); 
    				[tmp_unit] joinSilent tmp_group; 
    				//tmp_unit moveInDriver tmp_veh; 
    				tmp_unit assignAsDriver tmp_veh;
    				[tmp_unit] orderGetIn TRUE;
    				tmp_unit disableAI "AUTOTARGET"; 
    				tmp_unit disableAI "TARGET"; 
    				tmp_unit disableAI "MOVE"; 
    			};
    
    			//gunner
    			if (_vehClass in mcti_resistance_GunnerNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_gunnersCount = _gunnersCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				//_pos from HV
    				tmp_unit2 = "Ins_Soldier_Crew" createUnit [ _pos, tmp_group, "", (0.5 + 0.1 * _diff * _diff)];
    				tmp_unit2 setDir (deg _povorot); 
    				[tmp_unit2] joinSilent tmp_group; 
    				//tmp_unit2 moveInGunner tmp_veh; 
    				tmp_unit2 assignAsGunner tmp_veh;
    				[tmp_unit2] orderGetIn TRUE;
    				tmp_unit2 disableAI "AUTOTARGET"; 
    				tmp_unit2 disableAI "TARGET"; 
    				tmp_unit2 disableAI "MOVE"; 
    			};
    
    			//commander
    			if (_vehClass in mcti_resistance_CommNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_commCount = _commCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				//_pos from HV
    				tmp_unit3 = "Ins_Soldier_Crew" createUnit [ _pos, tmp_group, "", (0.5 + 0.1 * _diff * _diff)];
    				tmp_unit3 setDir (deg _povorot); 
    				[tmp_unit3] joinSilent tmp_group; 
    				//tmp_unit3 moveInCommander tmp_veh; 
    				tmp_unit3 assignAsCommander tmp_veh;
    				[tmp_unit3] orderGetIn TRUE;
    				tmp_unit3 disableAI "AUTOTARGET"; 
    				tmp_unit3 disableAI "TARGET"; 
    				tmp_unit3 disableAI "MOVE"; 
    			};
    
    		};
    
    		// Ñледующий город
    		_unitCountTotal = _unitCountTotal + _unitCountTown;
    		_i = _i + 1;
    	} forEach mcti_town_markerCoords;
    
    };
    diag_log format["Total Units: %1, Light Vehicles: %2, Heavy Vehicles: %3, Drivers: %4, Gunners: %5, Commanders: %6", _unitCountTotal, _lvCount, _hvCount, _driversCount, _gunnersCount, _commCount]; //dbg////////
    
    };
    

    2010/01/07, 22:34:22 Unsupported language Russian in stringtable
    2010/01/07, 22:34:56 Error in expression <e _area == typename []) then {_position distance _center < _maxdis} else {[_area>
    2010/01/07, 22:34:56   Error position: <distance _center < _maxdis} else {[_area>
    2010/01/07, 22:34:56   Error distance: Тип ЧиÑло, ожидаетÑÑ ÐœÐ½Ð¾Ð¶ÐµÑтво,Объект,Location
    2010/01/07, 22:34:56 File ca\modules\functions\systems\fn_locations.sqf, line 114
    2010/01/07, 22:35:16 Server: Update of object 2:35 arrived from nonowner
    2010/01/07, 22:36:26 "Total Units: 629, Light Vehicles: 81, Heavy Vehicles: 61, Drivers: 142, Gunners: 136, Commanders: 15"
    2010/01/07, 22:36:42 Server: Object 3:1 not found (message 121)

    ---------- Post added at 01:05 ---------- Previous post was at 23:46 ----------

    another step, I took, was:

    i added each unit , vehicle and group into unique variable and put them in speacial public arrays...

    but now I don't see infantry in the game, and vehicles are empty.

    // mca_resistance_init.sqf
    // version 1.0s
    
    if (isServer) then
    {
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    
    waitUntil { time > 10};
    
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    
    mcti_resistance_infantry = [ "CDF_Soldier_Strela", "CDF_Soldier_RPG", "CDF_Soldier_AR", "CDF_Soldier_Crew", "CDF_Soldier_Engineer", "CDF_Commander", "CDF_Soldier_GL", "CDF_Soldier_MG", "CDF_Soldier_Marksman", "CDF_Soldier_Medic", "CDF_Soldier_Militia", "CDF_Soldier_Officer", "CDF_Soldier_Pilot", "CDF_Soldier", "CDF_Soldier_Sniper", "CDF_Soldier_Light", "CDF_Soldier_Spotter" ];
    // "CDF_Soldier_TL"
    
    mcti_resistance_lightVehicles = [ "UAZ_AGS30_CDF", "UAZ_MG_CDF", "Ural_ZU23_CDF", "BRDM2_CDF", "BRDM2_ATGM_CDF" ];	
    mcti_resistance_heavyVehicles = ["BMP2_CDF", "BMP2_HQ_CDF", "T72_CDF", "ZSU_CDF", "BMP2_Ambul_CDF"];
    
    mcti_resistance_DriverNeeded = [ "UAZ_AGS30_CDF", "UAZ_MG_CDF", "Ural_ZU23_CDF", "BRDM2_CDF", "BRDM2_ATGM_CDF", "BMP2_CDF", "BMP2_HQ_CDF", "T72_CDF", "ZSU_CDF", "BMP2_Ambul_CDF" ];	
    mcti_resistance_GunnerNeeded = [ "UAZ_AGS30_CDF", "UAZ_MG_CDF", "Ural_ZU23_CDF", "BRDM2_CDF", "BRDM2_ATGM_CDF", "BMP2_CDF", "BMP2_HQ_CDF", "T72_CDF", "ZSU_CDF" ];
    mcti_resistance_CommNeeded = [ "T72_CDF" ];
    
    publicVariable "mcti_resistance_infantry"; 
    publicVariable "mcti_resistance_lightVehicles"; 
    publicVariable "mcti_resistance_heavyVehicles"; 
    
    publicVariable "mcti_resistance_DriverNeeded"; 
    publicVariable "mcti_resistance_GunnerNeeded"; 
    publicVariable "mcti_resistance_CommNeeded"; 
    
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    
    mcti_res_groups = []; publicVariable "mcti_res_groups";
    mcti_res_units = []; publicVariable "mcti_res_units";
    mcti_res_vehicles = []; publicVariable "mcti_res_vehicles";
    
    mcti_res_group_prefix = "mcti_res_group_";
    mcti_res_unit_prefix = "mcti_res_unit_";
    mcti_res_vehicle_prefix = "mcti_res_vehicle_";
    
    //global counters
    gc_u = 0;
    gc_v = 0;
    
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    
    private ["_i", "_xf", "_yf", "_townSize", "_diff", "_radiusMax", "_radius", "_angle", "_povorot", "_nInfantry", "_nLightVeh", "_nArmored", "_cInf", "_cLV", "_cArm", "_j", "_DriverNeeded", "_vehClass", "_unitCountTown", "_unitCountTotal", "_pos", "_lvCount", "_hvCount", "_driversCount", "_gunnersCount", "_commCount", "_varName", "_groupName"];
    
    _cInf = count mcti_resistance_infantry - 1;
    _cLV = count mcti_resistance_lightVehicles - 1;
    _cArm = count mcti_resistance_heavyVehicles - 1;
    _diff = mcti_resistance_difficulty; // 1 или 2
    _unitCountTotal = 0;
    _lvCount = 0;
    _hvCount = 0;
    _driversCount = 0;
    _gunnersCount = 0;
    _commCount = 0;
    
    if (mcti_resistance_enabled) then
    {
    	_i = 0;
    	{
    		// заÑелÑем каждый i-ый город
    		// new group
    		tmp_group = createGroup resistance; 
    		_varName = mcti_res_group_prefix + (str _i);
    		_groupName = _varName;
    		Call Compile Format ["%1=tmp_group; PublicVariable ""%1""; mcti_res_groups = mcti_res_groups + [%1];",_varName]; // mcti_res_group_* = tmp_group; (* = _i)
    
    		_unitCountTown = 0;
    		_xf = _x select 0;
    		_yf = _x select 1; // X,Y координаты флага города
    		_townSize = mcti_town_sizes select _i;
    		_radiusMax = _townSize * 80; //метров
    
    		// numbers of units in town
    		_nInfantry = round (random (_townSize * (_diff * 3 )));
    		_nLightVeh = round (random (_townSize * (_diff * 1.0 )));
    		_nArmored = round (random (_townSize * (_diff * 0.75 )));
    		// placing Infantry
    		for [{_j=0},{_j<_nInfantry},{_j=_j+1}] do
    		{
    			_unitCountTown = _unitCountTown + 1;
    			_radius = round (random _radiusMax);
    			_angle = random (2 * pi);
    			_povorot = random (2 * pi);
    			_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			while {surfaceIsWater _pos} do 
    			{
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			};
    			Call Compile Format ["    tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, %1, """", (0.5 + 0.1 * _diff * _diff)];        ",   _groupName   ];
    			_varName = mcti_res_unit_prefix + (str gc_u);
    			gc_u = gc_u + 1;
    			tmp_unit SetVehicleVarName _varName;
    			tmp_unit Call Compile Format ["%1=_this; PublicVariable ""%1""; mcti_res_units = mcti_res_units + [%1];",_varName]; // mcti_res_unit_* = tmp_unit;
    			Call Compile Format ["   	 %1 setDir (deg _povorot); [%1] joinSilent %2; if (_j == 0) then { %2 selectLeader %1  }; %1 disableAI ""AUTOTARGET""; %1 disableAI ""TARGET""; %1 disableAI ""MOVE""; 	 ", _varName, mcti_res_group_prefix + (str _i)];				
    
    		};
    
    		// placing Light Vehicles
    		for [{_j=0},{_j<_nLightVeh},{_j=_j+1}] do
    		{
    			_unitCountTown = _unitCountTown + 1;
    			_lvCount = _lvCount + 1;
    			_radius = round (random _radiusMax);
    			_angle = random (2 * pi);
    			_povorot = random (2 * pi);
    			_vehClass = (mcti_resistance_lightVehicles select (round (random _cLV))); 
    			_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			while {surfaceIsWater _pos} do 
    			{
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			};
    			tmp_veh = _vehClass createVehicle _pos;
    			_varName = mcti_res_vehicle_prefix + (str gc_v);
    			gc_v = gc_v + 1;
    			tmp_veh SetVehicleVarName _varName;
    			tmp_veh Call Compile Format ["%1=_this; PublicVariable ""%1""; mcti_res_vehicles = mcti_res_vehicles + [%1];",_varName]; // mcti_res_vehicle_* = tmp_veh;
    			Call Compile Format [" %1 setDir (deg _povorot);  ", _varName];
    
    
    			//driver
    			if (_vehClass in mcti_resistance_DriverNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_driversCount = _driversCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				// _pos from LV
    				Call Compile Format ["    tmp_unit =  ""Ins_Soldier_Crew"" createUnit [ _pos, %1, """", (0.5 + 0.1 * _diff * _diff)];        ",   _groupName   ];
    				_varName = mcti_res_unit_prefix + (str gc_u);
    				gc_u = gc_u + 1;
    				tmp_unit SetVehicleVarName _varName;
    				tmp_unit Call Compile Format ["%1=_this; PublicVariable ""%1""; mcti_res_units = mcti_res_units + [%1];",_varName]; // mcti_res_unit_* = tmp_unit;
    				Call Compile Format ["    %1 setDir (deg _povorot); [%1] joinSilent %2; %1 assignAsDriver (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [%1] orderGetIn TRUE; %1 disableAI ""AUTOTARGET""; %1 disableAI ""TARGET""; %1 disableAI ""MOVE"";     ", _varName, mcti_res_group_prefix + (str _i)];
    				//tmp_unit moveInDriver tmp_veh; 	
    
    			};
    
    			//gunner
    			if (_vehClass in mcti_resistance_GunnerNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_gunnersCount = _gunnersCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				// _pos from LV
    				Call Compile Format ["    tmp_unit =  ""Ins_Soldier_Crew"" createUnit [ _pos, %1, """", (0.5 + 0.1 * _diff * _diff)];        ",   _groupName   ];
    				_varName = mcti_res_unit_prefix + (str gc_u);
    				gc_u = gc_u + 1;
    				tmp_unit SetVehicleVarName _varName;
    				tmp_unit Call Compile Format ["%1=_this; PublicVariable ""%1""; mcti_res_units = mcti_res_units + [%1];",_varName]; // mcti_res_unit_* = tmp_unit;
    				Call Compile Format ["    %1 setDir (deg _povorot); [%1] joinSilent %2; %1 assignAsGunner (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [%1] orderGetIn TRUE; %1 disableAI ""AUTOTARGET""; %1 disableAI ""TARGET""; %1 disableAI ""MOVE"";     ", _varName, mcti_res_group_prefix + (str _i)];
    				//tmp_unit2 moveInGunner tmp_veh; 
    
    			};
    		};
    
    		// placing Heavy Vehicles
    		for [{_j=0},{_j<_nArmored},{_j=_j+1}] do
    		{
    			_unitCountTown = _unitCountTown + 1;
    			_hvCount = _hvCount + 1;
    			_radius = round (random _radiusMax);
    			_angle = random (2 * pi);
    			_povorot = random (2 * pi);
    			_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			while {surfaceIsWater _pos} do 
    			{
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			};
    			_vehClass = (mcti_resistance_heavyVehicles select (round (random _cArm)));
    			tmp_veh = _vehClass createVehicle _pos;
    			_varName = mcti_res_vehicle_prefix + (str gc_v);
    			gc_v = gc_v + 1;
    			tmp_veh SetVehicleVarName _varName;
    			tmp_veh Call Compile Format ["%1=_this; PublicVariable ""%1""; mcti_res_vehicles = mcti_res_vehicles + [%1];",_varName]; // mcti_res_vehicle_* = tmp_veh;
    			Call Compile Format [" %1 setDir (deg _povorot);  ", _varName];
    
    			//driver
    			if (_vehClass in mcti_resistance_DriverNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_driversCount = _driversCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				//_pos from HV
    				Call Compile Format ["    tmp_unit =  ""Ins_Soldier_Crew"" createUnit [ _pos, %1, """", (0.5 + 0.1 * _diff * _diff)];        ",   _groupName   ];
    				_varName = mcti_res_unit_prefix + (str gc_u);
    				gc_u = gc_u + 1;
    				tmp_unit SetVehicleVarName _varName;
    				tmp_unit Call Compile Format ["%1=_this; PublicVariable ""%1""; mcti_res_units = mcti_res_units + [%1];",_varName]; // mcti_res_unit_* = tmp_unit;
    				Call Compile Format ["    %1 setDir (deg _povorot); [%1] joinSilent %2; %1 assignAsDriver (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [%1] orderGetIn TRUE; %1 disableAI ""AUTOTARGET""; %1 disableAI ""TARGET""; %1 disableAI ""MOVE"";     ", _varName, mcti_res_group_prefix + (str _i)];
    				//tmp_unit moveInDriver tmp_veh; 	
    
    			};
    
    			//gunner
    			if (_vehClass in mcti_resistance_GunnerNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_gunnersCount = _gunnersCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				//_pos from HV
    				Call Compile Format ["    tmp_unit =  ""Ins_Soldier_Crew"" createUnit [ _pos, %1, """", (0.5 + 0.1 * _diff * _diff)];        ",   _groupName   ];
    				_varName = mcti_res_unit_prefix + (str gc_u);
    				gc_u = gc_u + 1;
    				tmp_unit SetVehicleVarName _varName;
    				tmp_unit Call Compile Format ["%1=_this; PublicVariable ""%1""; mcti_res_units = mcti_res_units + [%1];",_varName]; // mcti_res_unit_* = tmp_unit;
    				Call Compile Format ["    %1 setDir (deg _povorot); [%1] joinSilent %2; %1 assignAsGunner (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [%1] orderGetIn TRUE; %1 disableAI ""AUTOTARGET""; %1 disableAI ""TARGET""; %1 disableAI ""MOVE"";     ", _varName, mcti_res_group_prefix + (str _i)];
    				//tmp_unit2 moveInGunner tmp_veh; 
    
    			};
    
    			//commander
    			if (_vehClass in mcti_resistance_CommNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_commCount = _commCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				//_pos from HV
    				Call Compile Format ["    tmp_unit =  ""Ins_Soldier_Crew"" createUnit [ _pos, %1, """", (0.5 + 0.1 * _diff * _diff)];        ",   _groupName   ];
    				_varName = mcti_res_unit_prefix + (str gc_u);
    				gc_u = gc_u + 1;
    				tmp_unit SetVehicleVarName _varName;
    				tmp_unit Call Compile Format ["%1=_this; PublicVariable ""%1""; mcti_res_units = mcti_res_units + [%1];",_varName]; // mcti_res_unit_* = tmp_unit;
    				Call Compile Format ["    %1 setDir (deg _povorot); [%1] joinSilent %2; %1 assignAsCommander (mcti_res_vehicles select ((count mcti_res_vehicles) - 1)); [%1] orderGetIn TRUE; %1 disableAI ""AUTOTARGET""; %1 disableAI ""TARGET""; %1 disableAI ""MOVE"";     ", _varName, mcti_res_group_prefix + (str _i)];
    				//tmp_unit2 moveInGunner tmp_veh; 
    
    			};
    
    		};
    
    		// Ñледующий город
    		_unitCountTotal = _unitCountTotal + _unitCountTown;
    		_i = _i + 1;
    	} forEach mcti_town_markerCoords;
    
    	publicVariable "mcti_res_groups";
    	publicVariable "mcti_res_units";
    	publicVariable "mcti_res_vehicles";
    
    }; //res enabled
    diag_log format["Total Units: %1, Light Vehicles: %2, Heavy Vehicles: %3, Drivers: %4, Gunners: %5, Commanders: %6", _unitCountTotal, _lvCount, _hvCount, _driversCount, _gunnersCount, _commCount]; //dbg////////
    
    }; //isServer
    

    .rpt:

    2010/01/07, 23:57:49 Unsupported language Russian in stringtable

    2010/01/07, 23:58:24 Error in expression <e _area == typename []) then {_position distance _center < _maxdis} else {[_area>

    2010/01/07, 23:58:24 Error position: <distance _center < _maxdis} else {[_area>

    2010/01/07, 23:58:24 Error distance: Тип ЧиÑло, ожидаетÑÑ ÐœÐ½Ð¾Ð¶ÐµÑтво,Объект,Location

    2010/01/07, 23:58:24 File ca\modules\functions\systems\fn_locations.sqf, line 114

    2010/01/07, 23:58:45 Server: Update of object 2:35 arrived from nonowner

    2010/01/07, 23:59:04 Out of map

    2010/01/07, 23:59:04 Error R 1-2-C:4: Invalid path from [5880.47, 141.61, 4698.28] to [5893.91, 143.05, 4735.47].

    2010/01/07, 23:59:46 "Total Units: 569, Light Vehicles: 73, Heavy Vehicles: 49, Drivers: 122, Gunners: 115, Commanders: 14"

    Can anybody help?


  7. Thank you.

    I want to create COIN dynamically by script.

    I already have one working (original COIN) and want to modify it with your COIN.

    If I use the same instruction

    "ConstructionManager" createUnit [ getPos RU_MHQ, group_RU_MHQ, "COIN_RU_MHQ = this;"];
    will it work with your COIN too?

    ---------- Post added at 20:36 ---------- Previous post was at 20:34 ----------

    is x_consmod a string? "COIN_RU_MHQ" in my case?


  8. How can I make dialog movable?

    Tried this

    class mca_respawn
    {
    name=mca_respawn;
    idd=1;
    movingEnable=TRUE;
    movingEnabled=TRUE;
    controlsBackground[]={ mca_respawn_bg, mca_respawn_bgf1, mca_respawn_bgf2, mca_respawn_bgf3, mca_respawn_bgf4 };
    objects[]={};
    controls[]={ mca_respawn_lb1, mca_respawn_title, mca_respawn_counter, mca_respawn_map, mca_respawn_radio };

    but, hasn't helped..


  9. there is no _area in the code you posted so there is a different script giving you errors

    there is also assignasgunner

    assignascargo

    assignasdriver

    using these commands will make the unit walk to the vehicle and get in not just teleport like movein command

    of course!! it is game core's file ! look at the

    ca\modules\functions\systems\fn_locations.sqf
    ! all my scripts except one or two have "mca_" prefixes. It is game's file!

  10. I'm trying to spawn Infantry, Light and Heavy vehicles by this script. But drivers/gunners/commanders don't get in vehicles and error is given after diag_log's output about numbers of different people.

    // mca_resistance_init.sqf
    // version 1.0s
    
    if (isServer) then
    {
    
    ResHQ = createCenter resistance;	
    mcti_resistance_infantry = [ "CDF_Soldier_Strela", "CDF_Soldier_RPG", "CDF_Soldier_AR", "CDF_Soldier_Crew", "CDF_Soldier_Engineer", "CDF_Commander", "CDF_Soldier_GL", "CDF_Soldier_MG", "CDF_Soldier_Marksman", "CDF_Soldier_Medic", "CDF_Soldier_Militia", "CDF_Soldier_Officer", "CDF_Soldier_Pilot", "CDF_Soldier", "CDF_Soldier_Sniper", "CDF_Soldier_Light", "CDF_Soldier_Spotter", "CDF_Soldier_TL" ];
    
    mcti_resistance_lightVehicles = [ "UAZ_AGS30_CDF", "UAZ_MG_CDF", "Ural_ZU23_CDF", "BRDM2_CDF", "BRDM2_ATGM_CDF" ];	
    mcti_resistance_heavyVehicles = ["BMP2_CDF", "BMP2_HQ_CDF", "T72_CDF", "ZSU_CDF", "BMP2_Ambul_CDF"];
    
    mcti_resistance_DriverNeeded = [ "UAZ_AGS30_CDF", "UAZ_MG_CDF", "Ural_ZU23_CDF", "BRDM2_CDF", "BRDM2_ATGM_CDF", "BMP2_CDF", "BMP2_HQ_CDF", "T72_CDF", "ZSU_CDF", "BMP2_Ambul_CDF" ];	
    mcti_resistance_GunnerNeeded = [ "UAZ_AGS30_CDF", "UAZ_MG_CDF", "Ural_ZU23_CDF", "BRDM2_CDF", "BRDM2_ATGM_CDF", "BMP2_CDF", "BMP2_HQ_CDF", "T72_CDF", "ZSU_CDF" ];
    mcti_resistance_CommNeeded = [ "T72_CDF" ];
    
    publicVariable "mcti_resistance_infantry"; 
    publicVariable "mcti_resistance_lightVehicles"; 
    publicVariable "mcti_resistance_heavyVehicles"; 
    
    publicVariable "mcti_resistance_DriverNeeded"; 
    publicVariable "mcti_resistance_GunnerNeeded"; 
    publicVariable "mcti_resistance_CommNeeded"; 
    
    private ["_i", "_xf", "_yf", "_townSize", "_diff", "_radiusMax", "_radius", "_angle", "_povorot", "_nInfantry", "_nLightVeh", "_nArmored", "_cInf", "_cLV", "_cArm", "_j", "_DriverNeeded", "_vehClass", "_unitCountTown", "_unitCountTotal", "_pos", "_lvCount", "_hvCount", "_driversCount", "_gunnersCount", "_commCount"];
    _cInf = count mcti_resistance_infantry - 1;
    _cLV = count mcti_resistance_lightVehicles - 1;
    _cArm = count mcti_resistance_heavyVehicles - 1;
    _diff = mcti_resistance_difficulty; // 1 или 2
    _unitCountTotal = 0;
    _lvCount = 0;
    _hvCount = 0;
    _driversCount = 0;
    _gunnersCount = 0;
    _commCount = 0;
    
    if (mcti_resistance_enabled) then
    {
    	_i = 0;
    	{
    		// заÑелÑем каждый i-ый город
    		// surfaceIsWater [x, y] 
    		tmp_group = createGroup resistance; 
    		_unitCountTown = 0;
    		_xf = _x select 0;
    		_yf = _x select 1; // X,Y координаты флага города
    		_townSize = mcti_town_sizes select _i;
    		_radiusMax = _townSize * 80; //метров
    
    		// numbers of units in town
    		_nInfantry = round (random (_townSize * (_diff * 3 )));
    		_nLightVeh = round (random (_townSize * (_diff * 1.0 )));
    		_nArmored = round (random (_townSize * (_diff * 0.75 )));
    		// placing Infantry
    		for [{_j=0},{_j<_nInfantry},{_j=_j+1}] do
    		{
    			_unitCountTown = _unitCountTown + 1;
    			_radius = round (random _radiusMax);
    			_angle = random (2 * pi);
    			_povorot = random (2 * pi);
    			_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			while {surfaceIsWater _pos} do 
    			{
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			};
    			tmp_unit = (mcti_resistance_infantry select (round (random _cInf))) createUnit [ _pos, tmp_group, "", (0.5 + 0.1 * _diff * _diff)];
    			tmp_unit setDir (deg _povorot); 
    			tmp_unit disableAI "AUTOTARGET"; 
    			tmp_unit disableAI "TARGET"; 
    			tmp_unit disableAI "MOVE"; 
    		};
    
    		// placing Light Vehicles
    		for [{_j=0},{_j<_nLightVeh},{_j=_j+1}] do
    		{
    			_unitCountTown = _unitCountTown + 1;
    			_lvCount = _lvCount + 1;
    			_radius = round (random _radiusMax);
    			_angle = random (2 * pi);
    			_povorot = random (2 * pi);
    			_vehClass = (mcti_resistance_lightVehicles select (round (random _cLV))); 
    			_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			while {surfaceIsWater _pos} do 
    			{
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			};
    			tmp_veh = _vehClass createVehicle _pos;
    			tmp_veh setDir (deg _povorot); 
    
    			//driver
    			if (_vehClass in mcti_resistance_DriverNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_driversCount = _driversCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    				while {surfaceIsWater _pos} do 
    				{
    					_radius = round (random _radiusMax);
    					_angle = random (2 * pi);
    					_povorot = random (2 * pi);
    					_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    				};
    				tmp_unit2 = "Ins_Soldier_Crew" createUnit [ _pos, tmp_group, "", (0.5 + 0.1 * _diff * _diff)];
    				tmp_unit2 setDir (deg _povorot); 
    				tmp_unit2 moveInDriver tmp_veh; 
    				tmp_unit2 disableAI "AUTOTARGET"; 
    				tmp_unit2 disableAI "TARGET"; 
    				tmp_unit2 disableAI "MOVE"; 
    			};
    
    			//gunner
    			if (_vehClass in mcti_resistance_GunnerNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_gunnersCount = _gunnersCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    				while {surfaceIsWater _pos} do 
    				{
    					_radius = round (random _radiusMax);
    					_angle = random (2 * pi);
    					_povorot = random (2 * pi);
    					_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    				};
    				tmp_unit3 = "Ins_Soldier_Crew" createUnit [ _pos, tmp_group, "", (0.5 + 0.1 * _diff * _diff)];
    				tmp_unit3 setDir (deg _povorot); 
    				tmp_unit3 setUnitPos "Middle"; 
    				tmp_unit3 moveInGunner tmp_veh; 
    				tmp_unit3 disableAI "AUTOTARGET"; 
    				tmp_unit3 disableAI "TARGET"; 
    				tmp_unit3 disableAI "MOVE"; 
    			};
    		};
    
    		// placing Heavy Vehicles
    		for [{_j=0},{_j<_nArmored},{_j=_j+1}] do
    		{
    			_unitCountTown = _unitCountTown + 1;
    			_hvCount = _hvCount + 1;
    			_radius = round (random _radiusMax);
    			_angle = random (2 * pi);
    			_povorot = random (2 * pi);
    			_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			while {surfaceIsWater _pos} do 
    			{
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    			};
    			_vehClass = (mcti_resistance_heavyVehicles select (round (random _cArm)));
    			tmp_veh = _vehClass createVehicle _pos;
    			tmp_veh setDir (deg _povorot); 
    
    			//driver
    			if (_vehClass in mcti_resistance_DriverNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_driversCount = _driversCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    				while {surfaceIsWater _pos} do 
    				{
    					_radius = round (random _radiusMax);
    					_angle = random (2 * pi);
    					_povorot = random (2 * pi);
    					_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    				};
    				tmp_unit2 = "Ins_Soldier_Crew" createUnit [ _pos, tmp_group, "", (0.5 + 0.1 * _diff * _diff)];
    				tmp_unit2 setDir (deg _povorot); 
    				tmp_unit2 moveInDriver tmp_veh; 
    				tmp_unit2 disableAI "AUTOTARGET"; 
    				tmp_unit2 disableAI "TARGET"; 
    				tmp_unit2 disableAI "MOVE"; 
    			};
    
    			//gunner
    			if (_vehClass in mcti_resistance_GunnerNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_gunnersCount = _gunnersCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    				while {surfaceIsWater _pos} do 
    				{
    					_radius = round (random _radiusMax);
    					_angle = random (2 * pi);
    					_povorot = random (2 * pi);
    					_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    				};
    				tmp_unit3 = "Ins_Soldier_Crew" createUnit [ _pos, tmp_group, "", (0.5 + 0.1 * _diff * _diff)];
    				tmp_unit3 setDir (deg _povorot); 
    				tmp_unit3 moveInGunner tmp_veh; 
    				tmp_unit3 disableAI "AUTOTARGET"; 
    				tmp_unit3 disableAI "TARGET"; 
    				tmp_unit3 disableAI "MOVE"; 
    			};
    
    			//commander
    			if (_vehClass in mcti_resistance_CommNeeded) then
    			{
    				_unitCountTown = _unitCountTown + 1;
    				_commCount = _commCount + 1;
    				_radius = round (random _radiusMax);
    				_angle = random (2 * pi);
    				_povorot = random (2 * pi);
    				_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    				while {surfaceIsWater _pos} do 
    				{
    					_radius = round (random _radiusMax);
    					_angle = random (2 * pi);
    					_povorot = random (2 * pi);
    					_pos = [(_xf + _radius * cos (deg _angle)), (_yf + _radius * sin (deg _angle))];
    				};
    				tmp_unit4 = "Ins_Soldier_Crew" createUnit [ _pos, tmp_group, "", (0.5 + 0.1 * _diff * _diff)];
    				tmp_unit4 setDir (deg _povorot); 
    				tmp_unit4 moveInCommander tmp_veh; 
    				tmp_unit4 disableAI "AUTOTARGET"; 
    				tmp_unit4 disableAI "TARGET"; 
    				tmp_unit4 disableAI "MOVE"; 
    			};
    
    		};
    
    		// Ñледующий город
    		_unitCountTotal = _unitCountTotal + _unitCountTown;
    		_i = _i + 1;
    	} forEach mcti_town_markerCoords;
    
    };
    diag_log format["Total Units: %1, Light Vehicles: %2, Heavy Vehicles: %3, Drivers: %4, Gunners: %5, Commanders: %6", _unitCountTotal, _lvCount, _hvCount, _driversCount, _gunnersCount, _commCount]; //dbg////////
    
    };
    

    2010/01/07, 6:58:42 Error in expression <e _area == typename []) then {_position distance _center < _maxdis} else {[_area>

    2010/01/07, 6:58:42 Error position: <distance _center < _maxdis} else {[_area>

    2010/01/07, 6:58:42 Error distance: Тип ЧиÑло, ожидаетÑÑ ÐœÐ½Ð¾Ð¶ÐµÑтво,Объект,Location

    2010/01/07, 6:58:42 File ca\modules\functions\systems\fn_locations.sqf, line 114

    Could you help me with this error and drivers, please.


  11. How can add crew to vehicles by scripts?

    Can I automatically create vehicle with driver or if it is heavy vehicle with gunner/commander ? Or I should do it manually ?

    ---------- Post added at 05:24 ---------- Previous post was at 05:01 ----------

    oh....

    I have found...

    moveInDriver, moveInGunner, moveInCommander, moveInCargo...

    but.. what is moveInTurret ? Why not gunner?

    ---------- Post added at 05:24 ---------- Previous post was at 05:24 ----------

    ah.. maybe for second turret if it exists...?


  12. Dont I know it! :( I used to be an actionscript programmer. I hate flash (though AS3 is a nice language!).

    I used to write in first AS :D it was so long ago)) haven't seen flash for ages, but I think it is still laggy, maybe even more now than that time :( PDAs, btw, cannot cope with them at all :D


  13. I think, we need just to import OFP's and Arma1's vehicles and islands to Arma2 (with some redecorating).

    Then add new features like more realistic damage system (with particles, no 0-1 or clea-totally damaged mode, with many areas of levels of damage), terramorping and scripting echancments (like sending objects from client to server or vice versa, global vehicle cargo and so on), EAX support, maybe even hardware PhysX acceleration for damaging system and physics..and Name it Arma 3 :D

    ---------- Post added at 02:21 ---------- Previous post was at 02:18 ----------

    Also it seems very strange to have some vehicles upgraded and some not (no T-90A, but Abrams A1M2 SEP, no upgraded Tungusska, no many other vehicles... no upgraded T-72, which with some exceptions are very similar to T-90, no BMD-4 and so on..........)


  14. MH6, How can I use it in my mission instead of original COIN ?

    ---------- Post added at 21:54 ---------- Previous post was at 21:42 ----------

    no horisontal alignment and no collision detection are great things, I have been looking for, but didn't know how to rip this CoIn out of game's code :D because original COIN doesn't allow to build Masking Nets over objects and doesn't allow building in the forest after cleaning up ground from trees. If I make it working in my mission I will be the happiest man on Earth, maybe :)


  15. My previous messages were deleted...so... I'm writing again....

    I'm trying to remove weapons from playable NPCs after their respawn (they begin game without guns, but have them after respawn). The code is following:

    // mca_players_init_s.sqf
    // version 1.1s
    
    if (isServer) then
    {
    
    {
    	_x setVehicleInit "removeAllWeapons this; ";
    	if ( isNil{_x getVariable "mk_killedEHadded"} ) then 
    	{
    		_x addEventHandler ["killed", 
    		{ 
    			//[] execVM "mca_onNPCKilled.sqf";
    			[_this select 0] spawn {
    				private ["_unit"];
    				_unit = _this select 0;
    				diag_log format ["In spawn _unit=%1", _unit];//dbg						
    				waitUntil { alive _unit }; 					
    				//[_unit] execVM "mca_onNPCRespawn.sqf";
    				removeAllWeapons _unit;
    			};	
    		}];
    		_x setVariable ["mk_killedEHadded", true];
    	};
    } forEach RU_players;
    
    {
    	_x setVehicleInit "removeAllWeapons this; ";
    	if ( isNil{_x getVariable "mk_killedEHadded"} ) then 
    	{
    		_x addEventHandler ["killed", 
    		{ 
    			//[] execVM "mca_onNPCKilled.sqf";
    			[_this select 0] spawn {
    				private ["_unit"];
    				_unit = _this select 0;
    				waitUntil { alive _unit }; 
    				//[_unit] execVM "mca_onNPCRespawn.sqf";
    				removeAllWeapons _unit;
    			};	
    		}];
    		_x setVariable ["mk_killedEHadded", true];
    	};
    } forEach US_players;
    
    processInitCommands;
    
    };

    Well, I think I know why it doesn't work.

    For example RU_player_2 after death and RU_player_2 after respawn are different objects (the dead body isn't removed). When I modify script and wait until RU_player_2 respawns remove weapons not from _unit but from RU_player_2, then it works. But... I checked with diag_log, unit is RU_player_2 before respawn and RU_player_2 after respawn! So this pointer just changes its adress I guess but I have old value if I use _unit to adress to it... How can I check new unit to respawn? (player instead of _unit works fine for respawning myself, but how can server know that _unit respawned?) Please help.

    ---------- Post added at 19:58 ---------- Previous post was at 19:54 ----------

    maybe I can count a number _n of my _unit in array of players and check by number? hm... it will adress to old value (dead body) again..... how to address new unit?

    ---------- Post added at 20:07 ---------- Previous post was at 19:58 ----------

    sorry for flooding the thread, but I have found the solution to address to new _unit (using call compile):

    // mca_players_init_s.sqf
    // version 1.1s
    
    if (isServer) then
    {
    
    {
    	_x setVehicleInit "removeAllWeapons this; ";
    	if ( isNil{_x getVariable "mk_killedEHadded"} ) then 
    	{
    		_x addEventHandler ["killed", 
    		{ 
    			//[] execVM "mca_onNPCKilled.sqf";
    			[_this select 0] spawn 
    			{
    				private ["_unit"];
    				_unit = _this select 0;
    				sleep 0.5;
    				_s = format["          waitUntil { alive %1 }; removeAllWeapons %1; 					", _unit];
    				diag_log format ["_s=%1", _s];//dbg						
    				call compile _s;
    				//[_unit] execVM "mca_onNPCRespawn.sqf";
    			};	
    		}];
    		_x setVariable ["mk_killedEHadded", true];
    	};
    } forEach RU_players;
    
    {
    	_x setVehicleInit "removeAllWeapons this; ";
    	if ( isNil{_x getVariable "mk_killedEHadded"} ) then 
    	{
    		_x addEventHandler ["killed", 
    		{ 
    			//[] execVM "mca_onNPCKilled.sqf";
    			[_this select 0] spawn
    			 {
    				private ["_unit"];
    				_unit = _this select 0;
    				sleep 0.5;
    				_s = format["          waitUntil { alive %1 }; removeAllWeapons %1; 					", _unit];
    				diag_log format ["_s=%1", _s];//dbg						
    				call compile _s;
    				//[_unit] execVM "mca_onNPCRespawn.sqf";
    			};	
    		}];
    		_x setVariable ["mk_killedEHadded", true];
    	};
    } forEach US_players;
    
    processInitCommands;
    
    };

    ---------- Post added at 20:11 ---------- Previous post was at 20:07 ----------

    it is so boring to write in this super-hi-leveled-code.... I hope someday BIS will allow modders to code in game's code , like in NWN(2) they allow t write scripts... so much time I spend investigating this syntax and addressing problems....so boring....


  16. Can I modify or somehow edit Construction Interface, to make it build things not only horizontally , but with angle to ground (sorry for bad english).

    What do I mean:

    ordinary situation:

      ________
    |         |
    |  house  |
    -------------------
            \       |
             \      |
               \    |
    ground        \  |
                   \
    

    I want;

         /\
    \   /   \
     \/     \
       \     /
        \   /
         \/
          \

    ---------- Post added at 15:47 ---------- Previous post was at 15:42 ----------

    I want to place small objects not horizontally. (of cource in real life buildings are errected only horizontally, but such objects like power generator or sandbags dont have to be horizontal i think)


  17. hi, nettrucker

    so, I can simply add another action without script and with " " name (to "hide" text) ? :) I have thought about that. Nice idea :) Thanx.

    Player addaction [" ", ""]

    is that possible?

    ---------- Post added at 15:24 ---------- Previous post was at 15:23 ----------

    btw, I remember the same thing in crCTI or MFCTI.... I saw empty line in actions menu and thought what for did they do that , lol :D

    ---------- Post added at 15:26 ---------- Previous post was at 15:24 ----------

    What action? Addaction does not output a text in the center of the screen by default, it simply adds it to the action menu. If you use unit addAction ["text","scriptfile.sqf",[]] you're getting the text in the center of the screen from the script.

    unfortunately it DOES show the text of the action at the center of screen :D lol

×