I have created a little scrip which creates a LGB at a fixed distance of a given taget, ponting that target, and with setvelocity, gave it some thrust.
The amount of velocity is calculated (empirically) so the bomb will hit the point were the target is.
Combinig this little script with SnyPir laser traking script, we can recreate very acurately a laser guided attack from planes out of sigth anywere on the map.
Now, the problems, when the target is on the same heigth above the sea were i made the test to calculate the point of impact, the script works smoothly, but when the heigth above the sea changes, there is inacuraccy.
I cant understand why because the z pos of the bomb is related to the laser beam hit point itself, so the bomb is always at the same heigth over the target.
If some one knows what is happening here i will be grateful.
Regards.
The script is;
; Guided air attack by Viriato.
; radio chatter and comunications here
eagle sidechat "Roger, heading for target"
~15
eagle sidechat "weapon fired"
~4
;crear el misil
_missil = "laserGuidedBomb" createVehicle [(getpos Laser_obj select 0), (getpos Laser_obj select 1) -300, (getpos Laser_obj select 2) +150]
_missil setvelocity [0,50.9,0]
?called >= maxcall :exit ; 1 setradiomsg "null" ; eagle sidechat "All weapons fired, good luck"
called = called + 1
exit
I also include a working test mission.