Home   Help Search Login Register  

Author Topic: script question  (Read 453 times)

0 Members and 1 Guest are viewing this topic.

Offline Killzone

  • Members
  • *
  • War is the true Enemy
script question
« on: 28 Sep 2004, 04:10:06 »
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
"Everyone dies so deal with it and move on"

                                                      ME

Kammak

  • Guest
Re:script question
« Reply #1 on: 28 Sep 2004, 06:47:00 »
Reset the flyinheight to 60 before the doMove command...maybe.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:script question
« Reply #2 on: 28 Sep 2004, 12:57:55 »
Yeah, if he is below height 60 (for example, on the ground) when the script is called he's gonna be in a world of trouble.
Plenty of reviewed ArmA missions for you to play