_obj = _this

_shoots = ["Hellfire", "Maverick"]
_coord = [1000,-1000]
~30

#1
~5
_c1 = (_coord select (random ((count _coord)-0.5)))
_c2 = (_coord select (random ((count _coord)-0.5)))
_s = (_shoots select (random ((count _shoots)-0.5)))
_pos = [(getpos _obj select 0)+_c1, (getpos _obj select 1)+_c2, 100]
~0.1
_sn = createShell [_s, _pos, [0,0,0], player, _obj]
_d = (((getpos _obj select 0)-(_pos select 0)) atan2 ((getpos _obj select 1)-(_pos select 1)))
?(_d < 0): _d = 360 - abs(_d)
_sn setdir _d
~0.1
?(player distance _obj) < 100: showdebug ["DEBUG (showDebug [String, Time (ms)]) 'createShell' (createShell [String (shell\rocket), position, velocity, owner, target (for guided missiles)]", 5000]
?!(isnull (nearestobjectdistance [_obj, "camera", 100])): showdebug ["DEBUG (showDebug [String, Time (ms)]) 'createShell' (createShell [String (shell\rocket), position, velocity, owner, target (for guided missiles)]", 5000]
goto "1"