OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Uber-Pea on 11 Jun 2004, 12:34:33
-
Dudes, Im sure this was asked already but i didnt find anything under "chopper".
If I want a chopper to start only a few metres, but flying, above the ground, what to type? We all know getting a flyinheight 1 or sth command in the init line will cause the chopper to start in i.g. 50 metres, then changing to 1, then going to first wp. When the mission starts, I want the chopper to be only a few metres above the ground (This simulates a chopper leaving after having dropped an apc near the squad.)
Best would be something like this in init field:
this "CommandForStartInHeight" 5; this flyinheight 50;
so the chopper starts 5 metres above ground, but directly changes to 50.
Please tell me how this works.
Ey, for those of you who know ronalds cargo rope addon, the chute does work for you? For me after drop cargo, the cargo is suddenly not below the ch47 anymore, but on the ground.
I want the chute to work, otherwise i dont really get why there is a chue to be added to the mission etc...
CYA
-
You would probably need to put a setpos command in the chopper's init line. There's an example in the online comref.
-
Sorry I can't find an example that helps. I think first i should use getpos to get ch47's coords. Then save the var, adding it to setpos and giving it a +30 or sth in the z (or is height y??) coordinate. Unfortunately I'm a scripting newb and need someone who is a little more used to the whole thingy. Could ya give me a string?
CYA
-
Try this line in the choppers init field
this setpos [getpos this select 0, getpos this select 1, 5]; this flyinheight 50
-
Say your chopper name is "helo"
Put this in your chopper's init field:
this setpos [(GetPos this select 0),(GetPos this select 1),height]
Where height is how high you want it to start off the ground.(in your case 5.)
Then put a way point directly on the chopper, and in the activation field:
helo flyinheight 50
That should start the chopper wherever you want and then have it move to the new height.
p.s. you may have to also add to the init field (can't remember exactly);
this flyinheight startingheight
Blip
-
Ha!
Artak you beat me to it!
Blip