Can someone tell me what I am doing wrong.
I use an addaction command to call for airsupport of a unit not in my group. This part works great, I can move him anywhere I want on the map using mapclick and he goes. But when I want him to return home I use the script below and it works good enough (until I can refine it) but the problem is once he lands back at the base and I want to use him again he will not come. He just sits there. Here is the script I am using to order him home.
__________________
#start
Cas domove getpos H
Cas flyinheight 40
? Cas distance h <60: Goto "setpos"
~5
goto "start"
#setpos
cas setvelocity [0,0,0]
cas setPos [getPos h select 0, getpos h select 1, 30]
cas flyinheight 18
~.5
cas flyinheight 15
cas setPos [getPos h select 0, getpos h select 1, 30]
~5
cas flyinheight 30
~2
cas flyinheight 20
~2
cas flyinheight 10
~2
cas flyinheight 5
~2
cas flyinheight 0
~1
cas setfuel 0
cas flyinheight 0
~10
hint "C.A.S. is refueled and standing by"
~1
cas setfuel 1.0
cas setdammage 0
end