#loop
?mortarsdead: exit
_bearing = random(360)
_distance = random(50)+40
?(local gl5): _shell = "mortarshell" createvehicle [(getpos (leader grp1) select 0) + sin (getdir (leader grp1) + _bearing) * _distance, (getpos (leader grp1) select 1) + cos (getdir (leader grp1) + _bearing) * _distance, 50]
?_shell distance mortar3 < 80: deletevehicle _shell; goto "loop"
_shell setvelocity [0,0,-50]
~random(3)+1
goto "loop"