Home   Help Search Login Register  

Author Topic: Landing Gear Up/Pants on the Ground  (Read 2256 times)

0 Members and 1 Guest are viewing this topic.

Offline Nivraga

  • Members
  • *
Landing Gear Up/Pants on the Ground
« on: 03 Sep 2012, 07:11:30 »
I know this has been asked before ... the threads I've found do not provide a suitable answer. I know it can be done because I've done it - but I found the answer here and I lost the test mission in which I had it set up. I keep finding a reference to "Sefe's Landing Gear Tutorial" but I cannot find that either - maybe that's a Addon/Mod tutorial which wouldn't solve my problem.

Basically I want to have a plane on the ground with it's landing gear up - as if it did an emergency belling landing without exploding. I did find 1 solution in my forums search - I could have AI flying the plane long enough to get gear up - then set velocity to 0 - and move the plane to my crash site. However, I know there is a way to script this.

The Action command Plane action ["land gear"] does not work - maybe I'm not putting the Action Command in the right place - I just assumed Init.sqs or unit initialization.

Somebody please help me.

Offline Lenyoga

  • Professor of Misanthropology
  • Members
  • *
Re: Landing Gear Up/Pants on the Ground
« Reply #1 on: 03 Sep 2012, 18:55:14 »
That's a hard one... well, maybe the idea of having a plane flying already (then using deletevehicle to get rid of the driver, setvelocity 0 and setpos to where it should be) is the best one.
As a grandmother I've got lots of gold.

Offline Nivraga

  • Members
  • *
Re: Landing Gear Up/Pants on the Ground
« Reply #2 on: 03 Sep 2012, 19:32:06 »
So after thinking on this some more ... I'm pretty sure the answer was a script to run the landing gear up command as if the player was pilot. Anyone know how to write that?

There has to be a way to execute the gear up command with a script without being in the plane as pilot
« Last Edit: 03 Sep 2012, 19:33:49 by Nivraga »

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Landing Gear Up/Pants on the Ground
« Reply #3 on: 04 Sep 2012, 07:29:23 »
The best way to try this is to identify which plane you want to use. open it's pbo, look into its files for what code is used to animate the gear(much like animating a door). For example...
_plane Animate ["Rightgear", 1];
_plane Animate ["Leftgear", 1];
_plane Animate ["nosegear", 1];

Then you'll be looking like a fool with your pants on the ground  :dunno: Had to say it
« Last Edit: 04 Sep 2012, 07:31:58 by savedbygrace »

Offline Lenyoga

  • Professor of Misanthropology
  • Members
  • *
Re: Landing Gear Up/Pants on the Ground
« Reply #4 on: 04 Sep 2012, 09:56:16 »
Does it work with animate? I haven't seen any definitions of animations in the BIS .cpp for planes...
As a grandmother I've got lots of gold.

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Landing Gear Up/Pants on the Ground
« Reply #5 on: 04 Sep 2012, 23:31:32 »
I've depboed several plane addons and sought out the gear control scripts. Each addons gear script has that code in them(not in the config). The only difference is the name in which they refer to their gear. I've depboed the Soviet plane but found nothing to use and can't find the A10 files either. Not sure where to get my hands on  those scripts but you could always use an addon where finding things is much more simple.

Offline Lenyoga

  • Professor of Misanthropology
  • Members
  • *
Re: Landing Gear Up/Pants on the Ground
« Reply #6 on: 05 Sep 2012, 12:45:14 »
That's actually a great idea.
As a grandmother I've got lots of gold.

Offline Nivraga

  • Members
  • *
Re: Landing Gear Up/Pants on the Ground
« Reply #7 on: 06 Sep 2012, 06:43:23 »
The best way to try this is to identify which plane you want to use. open it's pbo, look into its files for what code is used to animate the gear(much like animating a door). For example...
_plane Animate ["Rightgear", 1];
_plane Animate ["Leftgear", 1];
_plane Animate ["nosegear", 1];

Then you'll be looking like a fool with your pants on the ground  :dunno: Had to say it

Thanks 'sbg' The addon I am using is Rad_F18 Hornet

After I depbo'd the addon I found in the config.cpp that for the action to raise or lower gear it was calling on gearctrl.sqs ... in that I found ...

;Gear Animations
_frontGearAnim="frontgearanim"
_leftGearAnim ="leftgearanim"
_rightGearAnim="rightgearanim"

so using your suggestion I created gear.sqs with simply this ...
crash Animate ["Rightgearanim", 1];
crash Animate ["Leftgearanim", 1];
crash Animate ["frontgearanim", 1];


call that sqs from the planes init and bang - looking like a fool with your pants on the ground.