I've really got into this whole scripting thing so I am trying to do as much as possible in outside scripts and not in the editor. So I have had a go at a test map where a heli takes off, flies to a spot, lands, takes off, flies back and lands at the original spot. It's all done by getting the position of named H spots ( not G ones
) and telling the heli to land.
The problem is that the heli wont land on the original H but will fly back and land at the spot it just took off from. Isn't it supposed to land at the nearest available H? I have included the mission for you to look at, here is the script anyway:
Pilot1 assignAsDriver Heli1
[Pilot1] orderGetIn true
Pilot1 move (getPos Heli1a)
@unitReady Pilot1
Heli1 land "land"
@(getPos Heli1 select 2) < 2
~4
Pilot1 move (getPos Heli1b)
@unitReady Pilot1
Heli1 land "land" <----- problem
@(getPos Heli1 select 2) < 2
Pilot1 action ["Engine Off", Heli1]
exit
I know it can be done with waypoints, but I don't want to use them