did you add the code for checking distance to the ship i put up earlier?
for the flybys - yh i thought that might happen but was being lazy
local turned = {}
local var = 0
function aircraft_flight_init(e)
turned[e] = 0
end
function aircraft_flight_main(e)
ai_soldier_state[e] = "patrol";
if var == 0 then
SetAnimationFrames(71,90)
if g_Entity[e]['animating'] == 0 then
LoopAnimation(e);
g_Entity[e]['animating'] =1
end
end
MoveForward(e,500)
LoopSound(e,0)
if g_Entity[e]['x'] < 1000 or g_Entity[e]['x'] > 50900 or g_Entity[e]['y'] < 1000 or g_Entity[e]['y'] > 50900 then
if turned[e] == 0 then
SetRotation(e,0,g_Entity[e]['angley']+math.random(-45,45),0)
turned[e] = 1
end
else
turned[e] = 0
end
end