Jump to content
Sign in to follow this  
BlackCatSLO

Flying AI plane exact over the target

Recommended Posts

Hy there, im writing script in witch you can order "onMap" AI AV8B2 bombers to fly over the target and drop bombs.

Every thing works great from taking off and landing, but the AI plane doesnt want to fly exact over the target. AI flies 600m away from the target(i did use doMove), and becouse im using few physic equations to calc optimal range to drop bombs, droping bombs doesnt occur. The droping range is about 20m - 60m but bomber doesnt come in that area.

I did try to use doTarget, but bomber uses machine gun instead.

I only need to know how to order plane to fly over the target area, tnx for help.

I hope you understand whats my problem and sory for bad english.

Share this post


Link to post
Share on other sites

I ran into the exact thing in a mission I made using "domove" and I found that those planes WILL NOT go where you want.

You can put a marker in a straight line from takeoff 1000m out and they will miss the marker every time.

What I had to do was run the map over and over and move the markers around until the plane went where I wanted. Its strange but they seem to miss the marker to the same place every time so moving it seems to work.

I want dealing with 20 to 60m though. I just created the bombs where they needed to fall so I didn't have to deal with that.

Share this post


Link to post
Share on other sites

im droping bombs with<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_pilotunit selectWeapon "BomberLauncher"

_pilotunit fire "BomberLauncher"

~0.3

_pilotunit fire "BomberLauncher"

~0.3

_pilotunit fire "BomberLauncher"

i did find out what is going wrong, becouse i was using pitagora for calcing 2d distance and "distance" the coordinate units and meter units ratio wasn't right(with distance value was 200m and with coord pitagora was 10m biggrin_o.gif). And now plane flies in 2d space 1m - 10m away from target.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×