// ensures the player uses a satchel to destroy the radio tower.

_airradio = _this select 0;

for [{_loop=0}, {_loop<1}, {_loop=_loop}] do
{
	sleep 1.0;
	
	_bomb = (_airradio nearObjects ["DemoCharge_Remote_Ammo",7]) select 0;	
	if(isNil "_bomb") then { _bomb = (_airradio nearObjects ["SatchelCharge_Remote_Ammo",7]) select 0; };
		
	if(!isNil "_bomb") then
	{
		if(not isNull _bomb) then 
		{
			hint "bomb planted";
			playsound "bombplanted";
			EGG_EVO_alatk = nearestObject [_bomb, "Man"];
			
			WaitUntil {not alive EGG_EVO_alatk or isNull _bomb};
			
			if((not alive EGG_EVO_alatk) and (not isNull _bomb)) then
			{
				deletevehicle _bomb;
				EGG_EVO_alatk = objNull;
			};
			
			if ((isNull _bomb) and (alive EGG_EVO_alatk)) then 
			{
				_airradio removealleventhandlers "handledamage";
				
				//reward
				EGG_EVO_sot = format["%1",_airradio];
				EGG_EVO_sor = EGG_EVO_radioscore;	
				EGG_EVO_sop = EGG_EVO_latk;
				EGG_EVO_latk = objNull;
				publicVariable "EGG_EVO_sot";
				publicVariable "EGG_EVO_sor";
				publicVariable "EGG_EVO_sop";
				//rewarded in sorew.sqf				
				_airradio setdamage 1;
				_loop=1;
			};			
		};
	};
};