funny - i did the very same thing yesterday on one of the
two towers in Tatu (the big town on the new BAS isle).
My AI controlled littlebird comes into that town with
a flyingheight of 65 meters (first i checked the height of
the tower - it was 50 meters).
Then it flies over the tower, flyinheight changes to 50 meters
(this will make the chopper like landing onto it)
Then i check if the height of the chopper is below 1, if so player
gets ejected - chopper says goodbye and heads back to base.
WP scripted is a good way to do such stuff.
create a waypoint: move close to that building, where you
want your chopper to land on
:note - first you need to check out, wether you can manually
(player controlled) land a chopper on that building or not.
Buildings where you can't do that will make the empty chopper
get bouncing, until it falls down or so.
then create a waypoint type: scripted onto the building, where
you want it to land. In the field: scripted you need to type
just the script name (no exec and no "")
let's say: landonroof.sqs
Now landonroof.sqs will be executed, once the chopper has
passed the waypoint before the waypoint type scripted.
A few parameters will be passed automatically to this script
by the waypoint:
_this select 0 => owner of the waypoint (group)
_this select 1 => position of the waypoint
_this select 2 => target - e.g: if you place the waypoint exactly
onto a vehicle, then you could get that vehicle into your script
that way. Not required for roof-landings.
OK, now the script:
<<landonroof.sqs>>
_group = _this select 0
_leader = leader _group
_units = units _group
_chopper = vehicle _leader
_pilot = driver _chopper
_pos = _this select 1
_pilot doMove _pos
~10
_chopper flyinheight 50
#loop
~1
?(getpos _chopper select 2 >=1): goto "loop"
hint "chopper has landed"
_chopper flyinheight 65
~1
exit
Well, at the top of the script i defined more variables then
required here, but that's just to give you an imagination
about what's possible with scripted wp.
Also you need to check out the height of the building, before
setting up the flyinheight for the chopper - 50 it is for the
tower building in Tatu, as i already said.
*hint* - to check out the height of a building, you could
use a radio-alpha trigger (repeatedly), and in the activation
field: hint format ["%1",getpos player select 2]
Then take a chopper and hover beside that building, just
to hit radio-alpha. Now you will see the height of the player.
:note - off course it won't return the exact height of the
building, but with a lil bit of playing around, i think you should
find that out soon
If you place the player exactly onto that building, you should
find yourself standing on the roof, when hitting preview.
The radio-alpha should then return 0 as height, that's why
i'm waiting for a height of below 1, in the script.
If this stuff is too complicated at the mo, just tell me the
building you want to use as landing platform, and i'm gonna
set up an example for you. I can't do that right now, as
i've just started working, and it still needs 8 more hours for
me to get back to my ofp.
~S~ CD