Jump to content

WAI: 1.0.0 - Alpha / Arma 3


itsatrap

Recommended Posts

Guys you got to remember this is a project that is no longer being worked on. Its falling behind and with more epoch updates this will come with more errors and problems unless someone picks up the project and brings it upto scratch. If you are new to all this or have very little knowledge of how the script works i suggest using a AI mission system that is being worked on regularly.

 

But hey good luck if you carry on working with this.

Link to comment
Share on other sites

How I can change style of hint message?

config.sqf line 141 wai_announce  = 

		// Missions
		wai_announce				= "hint";			// Setting this to true will announce the missions to those that hold a radio only "radio", "global", "hint", "text" 

 

Change it to hint, text, global. Radio is default.

Link to comment
Share on other sites

Atomik-fr i looked over your RPT seems WAI is not even running. Did you follow the directions on installing? There should have been a file that got packed into a PBO (I use PBO Manager) that goes in the Epoch/Hive/Addon. Then there are a couple more files that go in your MP Mission PBO. If you did not get this right the script wont work. I am new at this too I have made mistakes with the MP Mission files and the script stilled showed in the RPT as starting.

In regard to your Epoch/Hive/Addon folder you will find most everything in there will be a PBO. The SEM Mission is the first I have seen that puts something other than a PBO in that folder. If you did not pack the a3_epoch_WAI folder into a PBO that is the reason the mission is not starting. Do not change the name of the PBO as the files within it work off that tittle. (if I am wrong some with more experience please correct me)

 

If you continue to have troubles PM me I can help you out with the PBO I have working. It will just have my custom settings.

 

If you did get the PBO in there right, did you change anything in the PBO as far as configurations? That too will break it. Even a "," missing and everything stops. I learned most all of this the hard way.

Link to comment
Share on other sites

Hey guys has any one had issues with the mission rebel base not despawning when completed(all ai killed) if so is there a fix, also the mission seems to always spawn in Novy and was wondering if anyone has a way to fix this as the base seems to spawn inside buildings. I can email anyone that wants to help the current .sqf file for said mission or the whole pbo if they would like to take a look at it.

 

I got a custom version of WAI with new missions etc. This fixes the cleanup after completing a mission. Deletes all the mission objects (except the crate) and straggler ai if the mission has been completed after the time set in the config.sqf under: wai_clean_mission_time.

 

Change mission_winorfail.sqf to this:

 

if(isServer) then {

private ["_player_near","_map_marker","_node","_max_ai","_timeout_time","_currenttime","_starttime","_msglose","_msgwin","_msgstart","_objectives","_crate","_marker","_in_range","_objectivetarget","_position","_type","_complete","_timeout","_mission","_killpercent","_delete_mines","_cleanunits","_clearmission","_baseclean","_playernear"];

_mission = (_this select 0) select 0;

_crate = (_this select 0) select 1;

_type = (_this select 1) select 0;

_baseclean = _this select 2;

_msgstart = _this select 3;

_msgwin = _this select 4;

_msglose = _this select 5;

_position = position _crate;

_timeout = false;

_player_near = false;

_complete = false;

_starttime = time;

_start = false;

_timeout_time = ((wai_mission_timeout select 0) + random((wai_mission_timeout select 1) - (wai_mission_timeout select 0)));

_max_ai = (wai_mission_data select _mission) select 0;

_killpercent = _max_ai - (_max_ai * (wai_kill_percent / 100));

_mission_units = [];

if((_type == "patrol")) then {

_start = true;

};

if(_type == "bomb") then {

_start = true;

_timeout_time = wai_timeout_bomb;

// Debug

if(debug_mode) then {_timeout_time = 300;};

};

{

if (_x getVariable ["mission", nil] == _mission) then {

_mission_units set [count _mission_units, _x];

};

} count allUnits;

if(debug_mode) then { diag_log("WAI: _mission_units " + str(_mission_units)); };

RemoteMessage = [wai_announce,_msgstart];

publicVariable "RemoteMessage";

markerReady = true;

while {!_start && !_timeout} do {

sleep 1;

_currenttime = time;

{

if((isPlayer _x) && (_x distance _position <= 1500)) then {

_start = true

};

} count playableUnits;

if (_currenttime - _starttime >= _timeout_time) then {

_timeout = true;

};

};

{

_x enableAI "TARGET";

_x enableAI "AUTOTARGET";

_x enableAI "MOVE";

_x enableAI "ANIM";

_x enableAI "FSM";

_x setRank "Private";

} count _mission_units;

while {!_timeout && !_complete} do {

sleep 1;

_currenttime = time;

{

if((isPlayer _x) && (_x distance _position <= wai_timeout_distance) && (_type != "bomb") ) then {

_player_near = true;

};

} count playableUnits;

if (_currenttime - _starttime >= _timeout_time && !_player_near) then {

_timeout = true;

};

call {

if (_type == "crate") exitWith {

if(wai_kill_percent == 0) then {

{

if((isPlayer _x) && (_x distance _position <= 30)) then {

_complete = true;

};

} count playableUnits;

} else {

if(((wai_mission_data select _mission) select 0) <= _killpercent) then {

{

if((isPlayer _x) && (_x distance _position <= 30)) then {

_complete = true;

};

} count playableUnits;

};

};

};

if (_type == "kill") exitWith {

if(((wai_mission_data select _mission) select 0) == 0) then {

_complete = true;

};

};

if (_type == "patrol") exitWith {

if(((wai_mission_data select _mission) select 0) == 0) then {

_complete = true;

};

};

if (_type == "assassinate") exitWith {

_objectivetarget = (_this select 1) select 1;

{

_complete = true;

if (alive _x) exitWith {_complete = false;};

} count units _objectivetarget;

};

if (_type == "bomb") exitWith {

{

if((isPlayer _x) && (_x distance _position <= 2.5)) then {

_complete = true;

};

} count playableUnits;

};

if (_type == "resource") exitWith {

{

if((isPlayer _x) && (_x distance _position <= 30)) then {

_complete = true;

};

} count playableUnits;

};

};

};

if (_complete) then {

if (typeOf(_crate) in (crates_large + crates_medium + crates_small)) then {

if(wai_crates_smoke && sunOrMoon == 1) then {

_marker = "SmokeShellPurple" createVehicle getPosATL _crate;

_marker setPosATL (getPosATL _crate);

_marker attachTo [_crate,[0,0,0]];

};

if (wai_crates_flares && sunOrMoon != 1) then {

_marker = "B_IR_Grenade" createVehicle getPosATL _crate;

_marker setPosATL (getPosATL _crate);

_marker attachTo [_crate, [0,0,0]];

};

};

_delete_mines = ((wai_mission_data select _mission) select 2);

if(count _delete_mines > 0) then {

{

if(typeName _x == "ARRAY") then {

{

deleteVehicle _x;

} count _x;

} else {

deleteVehicle _x;

};

} forEach _delete_mines;

};

// WINNING

RemoteMessage = [wai_announce,_msgwin];

publicVariable "RemoteMessage";

if (wai_clean_mission) then {

[_position,_baseclean,_mission] spawn {

private ["_pos","_clean","_finish_time","_cleaned","_playernear","_currenttime","_miss"];

_pos = _this select 0;

_clean = _this select 1;

_miss = _this select 2;

_finish_time = time;

_playernear = false;

while {true} do {

_currenttime = time;

{

if ((isPlayer _x) && (_x distance _pos < 1000)) then { _playernear = true } else { _playernear = false}

} count playableUnits;

if ((!_playernear) && (_currenttime - _finish_time >= wai_clean_mission_time)) exitWith {};

sleep 1;

};

//if ((_currenttime - _finish_time >= wai_clean_mission_time) && !_playernear) then {

if (!_playernear) then {

{

if(typeName _x == "ARRAY") then {

{

deleteVehicle _x;

//if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };

} count _x;

} else {

deleteVehicle _x;

//if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };

};

} forEach _clean;

// Delete AI

{

if (_x getVariable ["mission", nil] == _miss) then {

if (alive _x) then {

_cleanunits = _x getVariable ["missionClean",nil];

if (!isNil "_cleanunits") then {

call {

if(_cleanunits == "ground") exitWith { ai_ground_units = (ai_ground_units -1); };

if(_cleanunits == "air") exitWith { ai_air_units = (ai_air_units -1); };

if(_cleanunits == "vehicle") exitWith { ai_vehicle_units = (ai_vehicle_units -1); };

if(_cleanunits == "static") exitWith { ai_emplacement_units = (ai_emplacement_units -1); };

};

};

};

deleteVehicle _x;

if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };

};

} count allUnits + vehicles + allDead;

};

};

};

};

if (_timeout) then {

//BOMB STUFF

if(_type == "bomb") then {

private["_bomb"];

{

// only send to players with in view distance

if((isPlayer _x) && (_x distance _position <= 2500)) then {

// Magic happens

WAIclient = ["nuke",_position];

publicVariable "WAIclient";

};

} count playableUnits;

// Wait for countdown

sleep 20;

{

_bomb = "Bo_GBU12_LGB_MI10" createVehicle (getPos _x);

_bomb setVectorDirAndUp [[0,0,1],[0,-1,0]];

_bomb setVelocity [0,0,-1000];

_x setDamage 1;

} forEach (_position nearObjects (wai_blacklist_range - 50));// Player base protection

};

// Delete AI

{

if (_x getVariable ["mission", nil] == _mission) then {

if (alive _x) then {

_cleanunits = _x getVariable ["missionClean",nil];

if (!isNil "_cleanunits") then {

call {

if(_cleanunits == "ground") exitWith { ai_ground_units = (ai_ground_units -1); };

if(_cleanunits == "air") exitWith { ai_air_units = (ai_air_units -1); };

if(_cleanunits == "vehicle") exitWith { ai_vehicle_units = (ai_vehicle_units -1); };

if(_cleanunits == "static") exitWith { ai_emplacement_units = (ai_emplacement_units -1); };

};

};

};

deleteVehicle _x;

if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };

};

} count allUnits + vehicles + allDead;

// Delete scenery

{

if(typeName _x == "ARRAY") then {

{

deleteVehicle _x;

//if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };

} count _x;

} else {

deleteVehicle _x;

//if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };

};

} forEach _baseclean + ((wai_mission_data select _mission) select 2) + [_crate];

// Loosing

RemoteMessage = [wai_announce,_msglose];

publicVariable "RemoteMessage";

};

_map_marker = (wai_mission_data select _mission) select 1;

wai_mission_markers = wai_mission_markers - [(_map_marker + str(_mission))];

wai_mission_data set [_mission, -1];

_complete

};

Link to comment
Share on other sites

8:23:20 "Loading config..."
8:23:20 Error in expression <kill;}];

if (!isNil "_mission") then {
wai_mission_data select _mission set [0,>
8:23:20 Error position: <wai_mission_data select _mission set [0,>
8:23:20 Error Undefined variable in expression: wai_mission_data
8:23:20 File x\addons\WAI\compile\spawn_soldier.sqf, line 206
8:23:20 Error in expression <if (!isNil "_mission") then {
_ainum = (wai_mission_data select _mission) select>
8:23:20 Error position: <wai_mission_data select _mission) select>
8:23:20 Error Undefined variable in expression: wai_mission_data
8:23:20 File x\addons\WAI\compile\spawn_static.sqf, line 70
8:23:21 Error in expression <kill;}];

if (!isNil "_mission") then {
wai_mission_data select _mission set [0,>
8:23:21 Error position: <wai_mission_data select _mission set [0,>
8:23:21 Error Undefined variable in expression: wai_mission_data
8:23:21 File x\addons\WAI\compile\spawn_soldier.sqf, line 206
8:23:21 Error in expression <if (!isNil "_mission") then {
_ainum = (wai_mission_data select _mission) select>
8:23:21 Error position: <wai_mission_data select _mission) select>
8:23:21 Error Undefined variable in expression: wai_mission_data
8:23:21 File x\addons\WAI\compile\spawn_static.sqf, line 70
8:23:21 "WAI: Spawned in 2 O_HMG_01_high_F"
8:23:21 "WAI: Static mission loaded"
8:23:21 Error in expression <
_mission = _this select 1;
_position = wai_mission_data select _mission select >
8:23:21 Error position: <wai_mission_data select _mission select >
8:23:21 Error Undefined variable in expression: wai_mission_data
8:23:21 File x\addons\WAI\compile\bandit_behaviour.sqf, line 14

this errors i have while trying to load WAI with custom mission enabled and automatic missions disibled

Link to comment
Share on other sites

  • 2 weeks later...

I got a custom version of WAI with new missions etc. This fixes the cleanup after completing a mission. Deletes all the mission objects (except the crate) and straggler ai if the mission has been completed after the time set in the config.sqf under: wai_clean_mission_time.

 

Change mission_winorfail.sqf to this:

 

if(isServer) then {

private ["_player_near","_map_marker","_node","_max_ai","_timeout_time","_currenttime","_starttime","_msglose","_msgwin","_msgstart","_objectives","_crate","_marker","_in_range","_objectivetarget","_position","_type","_complete","_timeout","_mission","_killpercent","_delete_mines","_cleanunits","_clearmission","_baseclean","_playernear"];

_mission = (_this select 0) select 0;

_crate = (_this select 0) select 1;

_type = (_this select 1) select 0;

_baseclean = _this select 2;

_msgstart = _this select 3;

_msgwin = _this select 4;

_msglose = _this select 5;

_position = position _crate;

_timeout = false;

_player_near = false;

_complete = false;

_starttime = time;

_start = false;

_timeout_time = ((wai_mission_timeout select 0) + random((wai_mission_timeout select 1) - (wai_mission_timeout select 0)));

_max_ai = (wai_mission_data select _mission) select 0;

_killpercent = _max_ai - (_max_ai * (wai_kill_percent / 100));

_mission_units = [];

if((_type == "patrol")) then {

_start = true;

};

if(_type == "bomb") then {

_start = true;

_timeout_time = wai_timeout_bomb;

// Debug

if(debug_mode) then {_timeout_time = 300;};

};

{

if (_x getVariable ["mission", nil] == _mission) then {

_mission_units set [count _mission_units, _x];

};

} count allUnits;

if(debug_mode) then { diag_log("WAI: _mission_units " + str(_mission_units)); };

RemoteMessage = [wai_announce,_msgstart];

publicVariable "RemoteMessage";

markerReady = true;

while {!_start && !_timeout} do {

sleep 1;

_currenttime = time;

{

if((isPlayer _x) && (_x distance _position <= 1500)) then {

_start = true

};

} count playableUnits;

if (_currenttime - _starttime >= _timeout_time) then {

_timeout = true;

};

};

{

_x enableAI "TARGET";

_x enableAI "AUTOTARGET";

_x enableAI "MOVE";

_x enableAI "ANIM";

_x enableAI "FSM";

_x setRank "Private";

} count _mission_units;

while {!_timeout && !_complete} do {

sleep 1;

_currenttime = time;

{

if((isPlayer _x) && (_x distance _position <= wai_timeout_distance) && (_type != "bomb") ) then {

_player_near = true;

};

} count playableUnits;

if (_currenttime - _starttime >= _timeout_time && !_player_near) then {

_timeout = true;

};

call {

if (_type == "crate") exitWith {

if(wai_kill_percent == 0) then {

{

if((isPlayer _x) && (_x distance _position <= 30)) then {

_complete = true;

};

} count playableUnits;

} else {

if(((wai_mission_data select _mission) select 0) <= _killpercent) then {

{

if((isPlayer _x) && (_x distance _position <= 30)) then {

_complete = true;

};

} count playableUnits;

};

};

};

if (_type == "kill") exitWith {

if(((wai_mission_data select _mission) select 0) == 0) then {

_complete = true;

};

};

if (_type == "patrol") exitWith {

if(((wai_mission_data select _mission) select 0) == 0) then {

_complete = true;

};

};

if (_type == "assassinate") exitWith {

_objectivetarget = (_this select 1) select 1;

{

_complete = true;

if (alive _x) exitWith {_complete = false;};

} count units _objectivetarget;

};

if (_type == "bomb") exitWith {

{

if((isPlayer _x) && (_x distance _position <= 2.5)) then {

_complete = true;

};

} count playableUnits;

};

if (_type == "resource") exitWith {

{

if((isPlayer _x) && (_x distance _position <= 30)) then {

_complete = true;

};

} count playableUnits;

};

};

};

if (_complete) then {

if (typeOf(_crate) in (crates_large + crates_medium + crates_small)) then {

if(wai_crates_smoke && sunOrMoon == 1) then {

_marker = "SmokeShellPurple" createVehicle getPosATL _crate;

_marker setPosATL (getPosATL _crate);

_marker attachTo [_crate,[0,0,0]];

};

if (wai_crates_flares && sunOrMoon != 1) then {

_marker = "B_IR_Grenade" createVehicle getPosATL _crate;

_marker setPosATL (getPosATL _crate);

_marker attachTo [_crate, [0,0,0]];

};

};

_delete_mines = ((wai_mission_data select _mission) select 2);

if(count _delete_mines > 0) then {

{

if(typeName _x == "ARRAY") then {

{

deleteVehicle _x;

} count _x;

} else {

deleteVehicle _x;

};

} forEach _delete_mines;

};

// WINNING

RemoteMessage = [wai_announce,_msgwin];

publicVariable "RemoteMessage";

if (wai_clean_mission) then {

[_position,_baseclean,_mission] spawn {

private ["_pos","_clean","_finish_time","_cleaned","_playernear","_currenttime","_miss"];

_pos = _this select 0;

_clean = _this select 1;

_miss = _this select 2;

_finish_time = time;

_playernear = false;

while {true} do {

_currenttime = time;

{

if ((isPlayer _x) && (_x distance _pos < 1000)) then { _playernear = true } else { _playernear = false}

} count playableUnits;

if ((!_playernear) && (_currenttime - _finish_time >= wai_clean_mission_time)) exitWith {};

sleep 1;

};

//if ((_currenttime - _finish_time >= wai_clean_mission_time) && !_playernear) then {

if (!_playernear) then {

{

if(typeName _x == "ARRAY") then {

{

deleteVehicle _x;

//if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };

} count _x;

} else {

deleteVehicle _x;

//if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };

};

} forEach _clean;

// Delete AI

{

if (_x getVariable ["mission", nil] == _miss) then {

if (alive _x) then {

_cleanunits = _x getVariable ["missionClean",nil];

if (!isNil "_cleanunits") then {

call {

if(_cleanunits == "ground") exitWith { ai_ground_units = (ai_ground_units -1); };

if(_cleanunits == "air") exitWith { ai_air_units = (ai_air_units -1); };

if(_cleanunits == "vehicle") exitWith { ai_vehicle_units = (ai_vehicle_units -1); };

if(_cleanunits == "static") exitWith { ai_emplacement_units = (ai_emplacement_units -1); };

};

};

};

deleteVehicle _x;

if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };

};

} count allUnits + vehicles + allDead;

};

};

};

};

if (_timeout) then {

//BOMB STUFF

if(_type == "bomb") then {

private["_bomb"];

{

// only send to players with in view distance

if((isPlayer _x) && (_x distance _position <= 2500)) then {

// Magic happens

WAIclient = ["nuke",_position];

publicVariable "WAIclient";

};

} count playableUnits;

// Wait for countdown

sleep 20;

{

_bomb = "Bo_GBU12_LGB_MI10" createVehicle (getPos _x);

_bomb setVectorDirAndUp [[0,0,1],[0,-1,0]];

_bomb setVelocity [0,0,-1000];

_x setDamage 1;

} forEach (_position nearObjects (wai_blacklist_range - 50));// Player base protection

};

// Delete AI

{

if (_x getVariable ["mission", nil] == _mission) then {

if (alive _x) then {

_cleanunits = _x getVariable ["missionClean",nil];

if (!isNil "_cleanunits") then {

call {

if(_cleanunits == "ground") exitWith { ai_ground_units = (ai_ground_units -1); };

if(_cleanunits == "air") exitWith { ai_air_units = (ai_air_units -1); };

if(_cleanunits == "vehicle") exitWith { ai_vehicle_units = (ai_vehicle_units -1); };

if(_cleanunits == "static") exitWith { ai_emplacement_units = (ai_emplacement_units -1); };

};

};

};

deleteVehicle _x;

if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };

};

} count allUnits + vehicles + allDead;

// Delete scenery

{

if(typeName _x == "ARRAY") then {

{

deleteVehicle _x;

//if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };

} count _x;

} else {

deleteVehicle _x;

//if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };

};

} forEach _baseclean + ((wai_mission_data select _mission) select 2) + [_crate];

// Loosing

RemoteMessage = [wai_announce,_msglose];

publicVariable "RemoteMessage";

};

_map_marker = (wai_mission_data select _mission) select 1;

wai_mission_markers = wai_mission_markers - [(_map_marker + str(_mission))];

wai_mission_data set [_mission, -1];

_complete

};

 

Could you repost this with the "code" tag so it's formatted properly?

Link to comment
Share on other sites

Could you repost this with the "code" tag so it's formatted properly?

if(isServer) then {

	private ["_player_near","_map_marker","_node","_max_ai","_timeout_time","_currenttime","_starttime","_msglose","_msgwin","_msgstart","_objectives","_crate","_marker","_in_range","_objectivetarget","_position","_type","_complete","_timeout","_mission","_killpercent","_delete_mines","_cleanunits","_clearmission","_baseclean","_playernear"];

	_mission	= (_this select 0) select 0;
	_crate		= (_this select 0) select 1;
	_type		= (_this select 1) select 0;
	_baseclean	= _this select 2;
	_msgstart	= _this select 3;
	_msgwin		= _this select 4;
	_msglose	= _this select 5;

	_position		= position _crate;
	_timeout 		= false;
	_player_near	= false;
	_complete		= false;
	_starttime 		= time;
	_start 			= false;
	_timeout_time	= ((wai_mission_timeout select 0) + random((wai_mission_timeout select 1) - (wai_mission_timeout select 0)));
	_max_ai			= (wai_mission_data select _mission) select 0;
	_killpercent 	= _max_ai - (_max_ai * (wai_kill_percent / 100));
	_mission_units	= [];

	if((_type == "patrol")) then {
		_start = true;
	};
	
	if(_type == "bomb") then {
		_start = true;
		_timeout_time = wai_timeout_bomb;
		
		// Debug 
		if(debug_mode) then {_timeout_time = 300;};
	};

	{
		if (_x getVariable ["mission", nil] == _mission) then {
			_mission_units set [count _mission_units, _x];
		};

	} count allUnits;
	if(debug_mode) then { diag_log("WAI: _mission_units " + str(_mission_units)); };
	
	RemoteMessage = [wai_announce,_msgstart];
	publicVariable "RemoteMessage";
	
	markerReady = true;

	while {!_start && !_timeout} do {

		sleep 1;
		_currenttime = time;

		{
			if((isPlayer _x) && (_x distance _position <= 1500)) then {
				_start = true
			};

		} count playableUnits;

		if (_currenttime - _starttime >= _timeout_time) then {
			_timeout = true;
		};

	};

	{	
		_x enableAI "TARGET";
		_x enableAI "AUTOTARGET";
		_x enableAI "MOVE";
		_x enableAI "ANIM";
		_x enableAI "FSM";
		_x setRank  "Private";
	} count _mission_units;

	while {!_timeout && !_complete} do {

		sleep 1;
		_currenttime = time;
		{
			if((isPlayer _x) && (_x distance _position <= wai_timeout_distance) && (_type != "bomb") ) then {
				_player_near = true;
			};
			
		} count playableUnits;

		if (_currenttime - _starttime >= _timeout_time && !_player_near) then {
			_timeout = true;
		};
		
		call {

			if (_type == "crate") exitWith {

				if(wai_kill_percent == 0) then {

					{
						if((isPlayer _x) && (_x distance _position <= 30)) then {
							_complete = true;
						};
					} count playableUnits;

				} else {

					if(((wai_mission_data select _mission) select 0) <= _killpercent) then {
						{
							if((isPlayer _x) && (_x distance _position <= 30)) then {
								_complete = true;
							};
						} count playableUnits;
					};

				};

			};

			if (_type == "kill") exitWith {
				if(((wai_mission_data select _mission) select 0) == 0) then {
					_complete = true;
				};
			};

			if (_type == "patrol") exitWith {
				if(((wai_mission_data select _mission) select 0) == 0) then {
					_complete = true;
				};
			};
			
			if (_type == "assassinate") exitWith {
				_objectivetarget = (_this select 1) select 1;
				{
					_complete = true;
					if (alive _x) exitWith {_complete = false;};
				} count units _objectivetarget;
			};
			
			if (_type == "bomb") exitWith {
				{
					if((isPlayer _x) && (_x distance _position <= 2.5)) then {
						_complete = true;
					};
				} count playableUnits;
			};

			if (_type == "resource") exitWith {
					{
						if((isPlayer _x) && (_x distance _position <= 30)) then {
							_complete = true;
						};
					} count playableUnits;

			};
		};
	};

	if (_complete) then {

		if (typeOf(_crate) in (crates_large + crates_medium + crates_small)) then {

			if(wai_crates_smoke && sunOrMoon == 1) then {
				_marker = "SmokeShellPurple" createVehicle getPosATL _crate;
				_marker setPosATL (getPosATL _crate);
				_marker attachTo [_crate,[0,0,0]];
			};

			if (wai_crates_flares && sunOrMoon != 1) then {
				_marker = "B_IR_Grenade" createVehicle getPosATL _crate;
				_marker setPosATL (getPosATL _crate);
				_marker attachTo [_crate, [0,0,0]];
			};

		};
		

		

		_delete_mines = ((wai_mission_data select _mission) select 2);

		if(count _delete_mines > 0) then {
		
			{
				if(typeName _x == "ARRAY") then {
					{
						deleteVehicle _x;
					} count _x;
				} else {
					deleteVehicle _x;	
				};
				
			} forEach _delete_mines;
			
		};
		
		// WINNING
		RemoteMessage = [wai_announce,_msgwin];
		publicVariable "RemoteMessage";
		
		if (wai_clean_mission) then {

			[_position,_baseclean,_mission] spawn {
				private ["_pos","_clean","_finish_time","_cleaned","_playernear","_currenttime","_miss"];
				_pos = _this select 0;
				_clean = _this select 1;
				_miss = _this select 2;
				_finish_time = time;
				_playernear = false;
				
				while {true} do {
					_currenttime = time;
					

					{
						if ((isPlayer _x) && (_x distance _pos < 1000)) then { _playernear = true } else { _playernear = false}
					} count playableUnits;	
					
					if ((!_playernear) && (_currenttime - _finish_time >= wai_clean_mission_time))  exitWith {};
					sleep 1;
				};


					//if ((_currenttime - _finish_time >= wai_clean_mission_time) && !_playernear) then {
					if (!_playernear) then {

						{
							if(typeName _x == "ARRAY") then {
			
							{
							deleteVehicle _x;
							//if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };
							} count _x;
			
							} else {
			
								deleteVehicle _x;
								//if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };
							};
							
						} forEach _clean;


					// Delete AI
						{
		
						if (_x getVariable ["mission", nil] == _miss) then {
			
						if (alive _x) then {

						_cleanunits = _x getVariable ["missionClean",nil];
		
						if (!isNil "_cleanunits") then {
				
							call {
								if(_cleanunits == "ground") 	exitWith { ai_ground_units = (ai_ground_units -1); };
								if(_cleanunits == "air") 		exitWith { ai_air_units = (ai_air_units -1); };
								if(_cleanunits == "vehicle") 	exitWith { ai_vehicle_units = (ai_vehicle_units -1); };
								if(_cleanunits == "static") 	exitWith { ai_emplacement_units = (ai_emplacement_units -1); };
									};
								};
							};
				
						deleteVehicle _x;
						if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };
						};

						} count allUnits + vehicles + allDead;
		
					};
					

			};
		};
	};
	
	if (_timeout) then {
		
		//BOMB STUFF 
		if(_type == "bomb") then {
			private["_bomb"];
			{
				// only send to players with in view distance
				if((isPlayer _x) && (_x distance _position <= 2500)) then {
					// Magic happens
					WAIclient = ["nuke",_position];
					publicVariable "WAIclient";
				};
			} count playableUnits;
			
			// Wait for countdown
			sleep 20;
			{
				_bomb = "Bo_GBU12_LGB_MI10" createVehicle (getPos _x);
				_bomb setVectorDirAndUp [[0,0,1],[0,-1,0]];
				_bomb setVelocity [0,0,-1000];
				_x setDamage 1;
			} forEach (_position nearObjects (wai_blacklist_range - 50));// Player base protection
		};
		
		// Delete AI
		{
		
			if (_x getVariable ["mission", nil] == _mission) then {
			
				if (alive _x) then {

					_cleanunits = _x getVariable ["missionClean",nil];
		
					if (!isNil "_cleanunits") then {
				
						call {
							if(_cleanunits == "ground") 	exitWith { ai_ground_units = (ai_ground_units -1); };
							if(_cleanunits == "air") 		exitWith { ai_air_units = (ai_air_units -1); };
							if(_cleanunits == "vehicle") 	exitWith { ai_vehicle_units = (ai_vehicle_units -1); };
							if(_cleanunits == "static") 	exitWith { ai_emplacement_units = (ai_emplacement_units -1); };
						};
					};
				};
				
				deleteVehicle _x;
				if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };
			};

		} count allUnits + vehicles + allDead;
		
		// Delete scenery
		{
			if(typeName _x == "ARRAY") then {
			
				{
					deleteVehicle _x;
					//if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };
				} count _x;
			
			} else {
			
				deleteVehicle _x;
				//if(debug_mode) then { diag_log("WAI: DELETE " + str(_x)); };
			};
			
		} forEach _baseclean + ((wai_mission_data select _mission) select 2) + [_crate];

		// Loosing
		RemoteMessage = [wai_announce,_msglose];
		publicVariable "RemoteMessage";
	};
	
	_map_marker = (wai_mission_data select _mission) select 1;
	wai_mission_markers = wai_mission_markers - [(_map_marker + str(_mission))];
	wai_mission_data set [_mission, -1];
	_complete

};
Link to comment
Share on other sites

//Cherno
[[4577.7153,4529.9458,0],[[4584.02,4521.47,0]],
[[12059.198,5118.8525,0],[12076.8,5112.95,0]],
[[10674.388,9422.9248,0],[10676.7,9437.48,0]]

The coordinates for Cherno-Map ( spawn-points west, north and east )

 

 

did you by any chance get a problem with missions spawning inside a house in novy ?

Link to comment
Share on other sites

Hi, on my Chernarus Server: the mission nuclear device successfully spawn, but no countdown and no nuke explosion...  under which conditions explodes the device?

 

 

ahm.. RTFM-Problem!  All clear: wai_timeout_bomb  :P

 

Hi :unsure:  I don't understand ... how did you fix it? Whats rtfm mean?

Link to comment
Share on other sites

It means 'Read the fucking manual' or the install guide as there is no manual.

 

hehe oh

 

Hi, on my Chernarus Server: the mission nuclear device successfully spawn, but no countdown and no nuke explosion...  under which conditions explodes the device?

 

 

ahm.. RTFM-Problem!  All clear: wai_timeout_bomb  :P

 

For those who were also curious, he means in a3_epoch_WAI/config.sqf you can look for:

wai_timeout_bomb            = 1800;                // How long bomb missions is, when it times out it gos BOOM

The default is 30 minutes but can be edited as seen above.

Link to comment
Share on other sites

itsatrap,

 

Thank you for your effort and dedication in porting this to A3.  Mass kudos to you!!!

 

I do have a question if you may.  I would like to change the radio chatter to something a bit more easy on the ears, I noticed the remote.sqf has a call for "RadioAmbient", assuming this is just for the nuke mission?  Any who, I changed it to something else but its still playing the same start-up chatter for a mission.  Can you point me to which file where I can change this setting?

 

So far I have only found these..."RadioAmbient8","RadioAmbient6","RadioAmbient2"

 

Thanks again!

Link to comment
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
×
×
  • Create New...