Home   Help Search Login Register  

Author Topic: Force out of helicopter  (Read 1558 times)

0 Members and 1 Guest are viewing this topic.

Offline Doc

  • Members
  • *
Force out of helicopter
« on: 21 Feb 2018, 18:15:10 »
I have a mission beginning, where I want a helicopter to land, then have the player and his squad get out of the helicopter. I've got the player and his squad into the copter using

"_x moveIncargo nighthawk" foreach units group this;

Problem is I get no option to Eject/Getout of the heli when it lands. Any ideas on how to do this? :hmmm:

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Force out of helicopter
« Reply #1 on: 22 Feb 2018, 07:30:39 »
Try assignAsCargo before moving them in :dunno:

Don't recall  ever hearing about not having the getout/eject action available ???
« Last Edit: 22 Feb 2018, 07:32:25 by h- »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Force out of helicopter
« Reply #2 on: 23 Feb 2018, 08:39:40 »
I don't recall ever having this issue and I used that command alot. I never had the need to assign them as cargo beforehand. Is the helicopter locked perhaps?

Is it one of the standard choppers in the game or is it an addon? Wouldn't have thought this would be a factor but it could well be.
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline Doc

  • Members
  • *
Re: Force out of helicopter
« Reply #3 on: 23 Feb 2018, 17:23:39 »
Gruntage you nailed the problem right on the head. I had the helicopter locked... :good: haha oh well my bad. Now I got a new issue how do I get my units into an empty unassigned boat?

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Force out of helicopter
« Reply #4 on: 23 Feb 2018, 18:00:39 »
Did not even cross my mind to suspect vehicle lock  :D
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Force out of helicopter
« Reply #5 on: 23 Feb 2018, 19:54:26 »
Quote
Now I got a new issue how do I get my units into an empty unassigned boat?

Are the units under your command?

If not, then you will need to assign one of them as a driver, one of as a gunner (if applicable) and the rest as cargo. The syntax is:

Code: [Select]
_soldier assignAsCargo _boat

Where _soldier and _boat are the names of the units. For the units being assigned as driver and gunner, use assignAsDriver & assignAsGunner. As a sidenote, if you're dealing with a vehicle with a commander spot (ie tank), you can use assignAsCommander.

After you've assigned your units, providing that the units are NOT under direct control of the player, you use the orderGetIn command:

Code: [Select]
[_soldier] orderGetIn true
If you have all of your units getting in as cargo, you can simplify matters by using this:

Code: [Select]
{[_x] OrderGetIn true} foreach units _groupname

However if you have one of your units getting in as a driver then you can't use this, and I think you will have to name each unit and have a line of code for each unit...not sure if there is an easier way of doing this.

Hope that helps.

PS. Next time open a new thread for a new question  :)
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Force out of helicopter
« Reply #6 on: 25 Feb 2018, 09:03:11 »
Quote
If you have all of your units getting in as cargo, you can simplify matters by using this
Considering the command takes an array as argument, no need for a looped method
Code: [Select]
(units _groupname) orderGetIn trueshould suffice..
Assuming of course that the command actually works as advertised  :P
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.