OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: stew on 18 Dec 2004, 16:16:24
-
Hi!
I'm stuck with a little oddity that I couldn't find in the FAQ or in the forum:
In my mission a helicopter lands in a base, picks up some people and leaves. Everything works fine so far, but before landing the chopper turns and faces in the "wrong" direction so that the AI soldiers have to run around it before getting in (which looks odd and makes them a bigger target than intended).
How do I set the direction in which the landed chopper faces?
(I already tried adding the setDir command to the waypoint, but that's an ugly way since the player might be watching the scene)
-
perhaps give the chopper another waypoint just after the pickup in the direction you want it to face and then off to wherever you want?
-
I tried, but without reproduceable results.
The heading seems to depend on many things like the location of buildings near the landing pad, the airspeed (depends on how far the last waypoint is away) and the terrain. So you may be lucky if it works in a certain setting, but sometimes it just doesn't work and the chopper turns before landing.
Best results I had when doing it on the desert island and by forching the chopper down with "flyInHeight 0", which unluckily isn't enough for my scen. (Here the chopper lands, pilots get out, go to a tent, wait until base is attacked, run to chopper, wait until the general gets in and then fly away)
-
Move your LS, or the direction from which the chopper approaches or leaves. Choppers can be a bit of a nightmare and it's better not to try to force it too much: if a chopper likes to turn just before landing, there's not much you can do to stop him.
Experiment till you find a landing site that does everything you want. There are scripts and tutes in the Ed Depot which will help.
This kind of thing is one of the real skills of mission editing, and why it is much harder than it looks. Chopper landing and loons boarding? Should take 2 minutes to set up. Wrong: it will take all afternoon (at least) if you want it to look really good.
-
This SetDir CompasAngle
that would make it face a certain direction