Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
  • 0
dok379

баг с транспортыми патрулями на wai миссиях

Баг с транспортыми патрулями на wai миссиях. Сделал патрули по всей карте, а они какие то странные, бывает достаточно стрельнуть с макарова в хамер М2, чтобы сжечь целую машину. В чем может быть дело? 

Код патрулей:

if (isServer) then {

	_this spawn {

		private["_vehicle","_position","_unitgroup","_waypoint_data","_num_waypoints","_leader","_count_wp","_waypoints","_waypoint_prev","_msg","_wp"];

		_vehicle 		= _this select 0;
		_position 		= _this select 1;
		_unitgroup 		= _this select 2;
		_waypoint_data 	= _this select 3;
		_num_waypoints 	= _this select 4;
		_leader			= leader _unitgroup;
		_count_wp		= count _waypoint_data;
		_waypoint_prev	= "";

		_vehicle setvehiclelock "UNLOCKED";

		_unitgroup setBehaviour "COMBAT";
		_unitgroup setCombatMode "YELLOW";

		{

			if(_leader == _x) then {
				_x assignAsDriver _vehicle;
				_x moveInDriver _vehicle;
				diag_log format["WAI: %1 assigned as driver",_x];
			} else {

				if((_vehicle emptyPositions "GUNNER") > 0) then {
					_x assignAsGunner _vehicle;
					_x moveInGunner _vehicle;

					diag_log format["WAI: %1 assigned as gunner",_x];
				} else {
					_x moveInCargo _vehicle;
					diag_log format["WAI: %1 assigned as cargo",_x];
				};

			};

		} forEach units _unitgroup;

		waitUntil {(_vehicle emptyPositions "DRIVER" == 0)};	// Wait until driver gets inside vehicle

		diag_log format["WAI: Driver is inside vehicle, continue.."];

		[_vehicle,_unitgroup] spawn {

			private["_vehicle","_unitgroup","_runmonitor"];

			_vehicle 	= _this select 0;
			_unitgroup 	= _this select 1;
			_runmonitor = true;

			while {(canMove _vehicle && _runmonitor)} do {
				if (fuel _vehicle < 0.2) then { _vehicle setfuel 1; };
				if (!(alive leader _unitgroup)) then {
					diag_log "WAI: Driver was killed, ejecting AI and removing waypoints.";
					_runmonitor = false;
				};
				sleep .5;
			};

			if(_runmonitor) then {
				diag_log "WAI: Vehicle became undriveable, ejecting crew.";
			};

			deleteWaypoint [_unitgroup, all];

			waitUntil { (speed _vehicle < 10) };	// Wait until vehicle slows down before ejecting crew

			{
				_x action ["eject",vehicle _x];
			} forEach crew _vehicle;

			_wp = _unitgroup addWaypoint [(getPos _vehicle),0];
			_wp setWaypointType "GUARD";
			_wp setWaypointBehaviour "COMBAT";

		};

		for "_i" from 1 to _num_waypoints do {

			_rand_nr = ceil(random((_count_wp - 1)));
			_waypoint = (_waypoint_data select _rand_nr);
			_waypoints set[_rand_nr,-1];
			_waypoints = _waypoints - [-1];
			
			_wp = _unitgroup addWaypoint [(_waypoint select 1),0];
			
			if(_i == _num_waypoints) then { 
				_wp setWaypointType "GUARD";
			} else { 
				_wp setWaypointType "MOVE";
			};

			_wp setWaypointBehaviour "CARELESS";
			_wp setWaypointCombatMode "YELLOW";

			if(_waypoint_prev != "") then {
				_msg = format["[RADIO] The patrol arrived at %1, heading towards %2",_waypoint_prev,(_waypoint select 0)];
			} else {
				_msg = format["[RADIO] The patrol is seen moving towards %1",(_waypoint select 0)];
			};
			
			sleep random(10);
			
			if (wai_radio_announce) then {
				RemoteMessage = ["radio",_msg];
				publicVariable "RemoteMessage";
			} else {
				[nil,nil,rTitleText,_msg,"PLAIN",10] call RE;
			};
			
			waitUntil{sleep 1;((_vehicle distance (_waypoint select 1) < 30) || !(alive leader _unitgroup) || (!canMove _vehicle))};

			if(!(alive leader _unitgroup) || (!canMove _vehicle)) exitWith {
				diag_log "WAI: Crew has been ejected, stopping creation of new waypoints.";
			};

			_waypoint_prev = (_waypoint select 0);
		};

	};

};

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Патруль у WAI сам по себе большой баг...при чем разраб сам об этом писал как-то.

Патруль вообще отключил.Использую DZAI патрули.

 

И кстати,у патруля используется не только файл миссии патруль (герой-бандос),но еще пару-тройку файлов.

Edited by Veter (see edit history)

Share this post


Link to post
Share on other sites



  • 0

 

бывает достаточно стрельнуть с макарова в хамер М2, чтобы сжечь целую машину

авто сгорает при убийстве водителя . если нужен патруль , то лучше ставить DZAI .

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By Akie
      Никак не могу разобраться как заставить ВАИ выводить миникарту при старте миссии, скрипт есть, просто как заставить его выводить её не могу понять, подскажите пожалуйста господа. Знаю что сообщения выводятся через mission_winorfail.sqf, но как оттуда сделать вызов вариабла сообщения я не знаю.
    • By Gromillla
      Доброго времени суток дамы и господа, и сразу к вопросу, в миссиях 2.2.5 версии, если боты "бандиты", то они скин игрока видят и реагируют на него, а если миссии с ботами "героями", то они скин игрока не видят. Скин  "RUS_Soldier_Marksman". Как соответственно решить эту проблему? Ошибок в РПТ нет.
    • By Шапокляк
      Как сделать чтоб Боты агрелись на Игрока с расстояния   1000-1500 метров. Темы вродибы есть но решений нет.
      ai_share_info = true; // AI share info on player position ai_share_distance = 2000; // distance from killed AI for AI to share your rough position ai_skill_extreme = [["aimingAccuracy",1.00],["aimingShake",1.00],["aimingSpeed",1.00],["endurance",1.00],["spotDistance",3.99],["spotTime",1.00],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00]]; // Extreme ai_skill_hard = [["aimingAccuracy",1.00],["aimingShake",1.00],["aimingSpeed",1.00],["endurance",1.00],["spotDistance",3.99],["spotTime",1.00],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00]]; // Hard менял все не помогает.!!!
    • By DIasTer
      кто нибудь встречался с этим? как исправить?
       
      19:54:45 File z\addons\dayz_server\WAI\compile\mission_winorfail.sqf, line 321
      19:54:46 Error in expression < ({[_x,_name] call fnc_inString;} count wai_clean_when_clear) != 0) then {

      _mi>
      19:54:46   Error position: <wai_clean_when_clear) != 0) then {

      _mi>
      19:54:46   Error Undefined variable in expression: wai_clean_when_clear
  • Our picks

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.