// converts remaining enemy to pows
// so they are able to be put into the capture state

_unit = _this select 0;
_grp = group _unit;
_type = typeof _unit;
_posu = position _unit;

if (_type in EGG_EVO_enemyOff) exitwith {};

unassignVehicle _unit;
_unit setPos _posu;
deleteVehicle _unit;

_lastgroup = createGroup east; 
_unitn = _lastgroup createUnit [_type, _posu, [], 10, "NONE"];Sleep EGG_EVO_GlobalSleep;
//_unitn addEventHandler ["killed", {handle = [_this select 0] execVM "scripts\bury.sqf"}];
[_unitn] join _lastgroup;

//_unitn setVehicleInit "ucap = [this] execVM 'scripts\submit.sqf';";
//processInitCommands;

//_netID = netID _unitn;
//_sCommand = format ["{(objectFromNetID '%1') ucap = [this] execVM 'scripts\submit.sqf';}", _netID];
//[_sCommand,"BIS_fnc_spawn",true,true] spawn BIS_fnc_MP;


	_sCommand = format ["[{
		[(objectFromNetID '%1')] execVM 'scripts\submit.sqf';
		}]", (netId _unitn) ];

	[call compile format["%1",_sCommand],"BIS_fnc_spawn", true, true] spawn BIS_fnc_MP; 


_recy = [objnull,_lastgroup] execVM "scripts\grecycle.sqf";

Sleep 3;
