_B = _this select 0
_H = _this select 1
_U = _this select 2

_Mess1 = "HeliHEmpty" CreateVehicle [0,0];_Mess1 setpos [getpos _B select 0, getpos _B select 1,0] 
_Mess = "Camera" camcreate getpos _Mess1 ;_Mess setpos [getpos _Mess select 0, getpos _Mess select 1,0] 
_Z = _Mess1 distance _Mess;deleteVehicle _Mess1;CamDestroy _Mess

? "MAP_WW2_BunkerX001" counttype [_B] == 1: goto "BunkerX001"
? "MAP_WW2_BunkerX002" counttype [_B] == 1: goto "BunkerX002"
? "MAP_WW2_BunkerX003" counttype [_B] == 1: goto "BunkerX003"
? "MAP_WW2_BunkerX004" counttype [_B] == 1: goto "BunkerX004"


exit
;--------------------------------------------------------------------------------------------------------------------
# BunkerX001
_B setpos [getpos _B select 0,getpos _B select 1,_H]
? _B distance nearestObject [_B,"Bunker_sMG42"] < 20 : goto "W001"
exit
#W001
_M = nearestObject [_B,"Bunker_sMG42"]
_X = getpos _M select 0
_Y = getpos _M select 1
_W = 0
#Runde1
? "man" counttype [nearestobject [_X + (sin _W * 5) , _Y + (cos _W * 5),0]] == 1:nearestobject [_X + (sin _W * 5) , _Y + (cos _W * 5),0] MoveInGunner _M ; goto "Ende1"      
_W = _W + 10
? _W < 360 : goto "Runde1"
#Ende1
_D = getdir _B
_A = getdir _B - 20
_M setdir (_D + 36)
_M setpos [(getpos _B select 0)+(sin _a * 2.4),(getpos _B select 1)+(cos _a * 2.4),0]
_Mess1 = "HeliHEmpty" CreateVehicle [0,0];_Mess1 setpos [getpos _M select 0, getpos _M select 1,0] 
_Mess = "Camera" camcreate getpos _Mess1 ;_Mess setpos [getpos _Mess select 0, getpos _Mess select 1,0] 
_J = _Mess1 distance _Mess;deleteVehicle _Mess1;CamDestroy _Mess
_M setpos [(getpos _B select 0)+(sin _a * 2.4),(getpos _B select 1)+(cos _a * 2.4),(0.65+_H+_U)+(_Z-_J)]

exit
;------------- Ende BunkerX001 ---------------------------------------------------------------------------------------
;--------------------------------------------------------------------------------------------------------------------
# BunkerX002
_B setpos [getpos _B select 0,getpos _B select 1,_H]
? _B distance nearestObject [_B,"Bunker_88"] < 20 : goto "W002"
exit
#W002
_M = nearestObject [_B,"Bunker_88"]
_X = getpos _M select 0
_Y = getpos _M select 1
_W = 0
#Runde2
? "man" counttype [nearestobject [_X + (sin _W * 5) , _Y + (cos _W * 5),0]] == 1:nearestobject [_X + (sin _W * 5) , _Y + (cos _W * 5),0] MoveInGunner _M ; goto "Ende2"      
_W = _W + 10
? _W < 360 : goto "Runde2"
#Ende2
_D = getdir _B
_A = getdir _B - 0
_M setdir (_D + 0)
_M setpos [(getpos _B select 0)+(sin _a * 0.2),(getpos _B select 1)+(cos _a * 0.2),0]
_Mess1 = "HeliHEmpty" CreateVehicle [0,0];_Mess1 setpos [getpos _M select 0, getpos _M select 1,0] 
_Mess = "Camera" camcreate getpos _Mess1 ;_Mess setpos [getpos _Mess select 0, getpos _Mess select 1,0] 
_J = _Mess1 distance _Mess;deleteVehicle _Mess1;CamDestroy _Mess
_M setpos [(getpos _B select 0)+(sin _a * 0.2),(getpos _B select 1)+(cos _a * 0.2),(0.2+_H+_U)+(_Z-_J)]

exit
;------------- Ende BunkerX002 ---------------------------------------------------------------------------------------
;--------------------------------------------------------------------------------------------------------------------
# BunkerX003
_B setpos [getpos _B select 0,getpos _B select 1,_H]
? _B distance nearestObject [_B,"Bunker_88"] < 20 : goto "W003"
exit
#W003
_M = nearestObject [_B,"Bunker_88"]
_X = getpos _M select 0
_Y = getpos _M select 1
_W = 0
#Runde3
? "man" counttype [nearestobject [_X + (sin _W * 5) , _Y + (cos _W * 5),0]] == 1:nearestobject [_X + (sin _W * 5) , _Y + (cos _W * 5),0] MoveInGunner _M ; goto "Ende3"      
_W = _W + 10
? _W < 360 : goto "Runde3"
#Ende3
_D = getdir _B
_A = getdir _B - 0
_M setdir (_D + 0)
_M setpos [(getpos _B select 0)+(sin _a * 0.2),(getpos _B select 1)+(cos _a * 0.2),0]
_Mess1 = "HeliHEmpty" CreateVehicle [0,0];_Mess1 setpos [getpos _M select 0, getpos _M select 1,0] 
_Mess = "Camera" camcreate getpos _Mess1 ;_Mess setpos [getpos _Mess select 0, getpos _Mess select 1,0] 
_J = _Mess1 distance _Mess;deleteVehicle _Mess1;CamDestroy _Mess
_M setpos [(getpos _B select 0)+(sin _a * 0.2),(getpos _B select 1)+(cos _a * 0.2),(0.25+_H+_U)+(_Z-_J)]
exit
;------------- Ende BunkerX003 ---------------------------------------------------------------------------------------
;--------------------------------------------------------------------------------------------------------------------
# BunkerX004
_B setpos [getpos _B select 0,getpos _B select 1,_H]
? _B distance nearestObject [_B,"Bunker_sMG42"] < 20 : goto "W004"
hind "kk"
exit
#W004
_M = nearestObject [_B,"Bunker_sMG42"]
_X = getpos _M select 0
_Y = getpos _M select 1
_W = 0
#Runde4
? "man" counttype [nearestobject [_X + (sin _W * 5) , _Y + (cos _W * 5),0]] == 1:nearestobject [_X + (sin _W * 5) , _Y + (cos _W * 5),0] MoveInGunner _M ; goto "Ende4"      
_W = _W + 10
? _W < 360 : goto "Runde4"
#Ende4
_D = getdir _B
_A = getdir _B 
_M setdir (_D + 0)
_M setpos [(getpos _B select 0)+(sin _a * 1.5),(getpos _B select 1)+(cos _a * 1.5),0]
_Mess1 = "HeliHEmpty" CreateVehicle [0,0];_Mess1 setpos [getpos _M select 0, getpos _M select 1,0] 
_Mess = "Camera" camcreate getpos _Mess1 ;_Mess setpos [getpos _Mess select 0, getpos _Mess select 1,0] 
_J = _Mess1 distance _Mess;deleteVehicle _Mess1;CamDestroy _Mess
_M setpos [(getpos _B select 0)+(sin _a * 1.5),(getpos _B select 1)+(cos _a * 1.5),(0.3+_H+_U)+(_Z-_J)]
exit
;------------- Ende BunkerX004 ---------------------------------------------------------------------------------------







