I'm trying to create a script that will cause an aircraft to fly from one side of the map to the other, and I've hit a couple of early stumbling blocks. The first is that the aircraft sits at ground level, no matter how high I placed it in the editor (when the script is set to default, it sits at the correct height, but the flight script causes it to drop), even with physics switched off. The second problem is that the aircraft only starts moving when you get within about 3000 units, and stops moving once it's gone beyond about 3000 units. How can I fix these issues?
function aircraft_flight_init(e)
var = 0
end
function aircraft_flight_main(e)
if var == 0 then
SetAnimationFrames(71,90)
if g_Entity[e]['animating'] == 0 then
LoopAnimation(e);
g_Entity[e]['animating'] =1
end
MoveForward(e,5000)
LoopSound(e,0)
end
end