Jump to content
ScytheOfLife

Squad and Player get out of heli once landed

Recommended Posts

Im trying  to make a heli move to invisible helipad, land and have the squad get out including a player. The closest I have managed was landing and the player being made to get out while the rest just sit there. I know I could issue disembark command. I was more hoping that I could have them all get out automatically.

 

I have been looking at posts, videos and nothing seems to work. What do I do?

Share this post


Link to post
Share on other sites

{_x action [“Eject”,vehicle _x]} forEach units group player;

  • Like 2

Share this post


Link to post
Share on other sites

Transport Unload WayPoint can do it for you..

Share this post


Link to post
Share on other sites

It doesn't it only takes the player out of the heli. The rest of the squad just stay inside the chopper.

Share this post


Link to post
Share on other sites

 

17 minutes ago, ScytheOfLife said:

Where do I put this?

{_x action [“Eject”,vehicle _x]} forEach units group player; 

Do you mean this ??

 

Share this post


Link to post
Share on other sites

I also suggest removing the fuel from the chopper to make sure the chopper stays put till you are all off, so he doesn't rebound back up injuring you or units in your group.

So, when helo is touching ground setFuel 0, and you could set a timer up for, let's say 30 seconds or so, and give him his fuel back if you're to re task him. 
Trigger condition:
isTouchingGround _theHelo

on trigger act:.
_theHelo setFuel 0;

And then run JShocks block of code.

Another tip, is to ungroup your pilots from your crew, and set your pilots to careless, just so they don't do something weird if your heli takes fire, and then set the gunner crew to aware, so they will return fire to protect you while you're in the heli and on the ground 😉 

Just ask if you run into any other problems.. 

  • Like 1

Share this post


Link to post
Share on other sites

Oh, and this might help as well.

unassignVehicle unit1;

There is other commands as well if you're still having issues. 

Share this post


Link to post
Share on other sites
30 minutes ago, ScytheOfLife said:

Where do I put this?

 

You would put it in the onAct (on Activation) of the waypoint for the player group.

Share this post


Link to post
Share on other sites
20 hours ago, ScytheOfLife said:

I was more hoping that I could have them all get out automatically.

https://community.bistudio.com/wiki/moveOut

 

To get the whole units at once, you need to use "moveOut" else "Eject" action to get out one by one :

 

ex:

in an .sqf

(run in initServer.sqf)

GF_Eject = {	
	{	
	unassignvehicle _x;
	//_x action ["Eject", vehicle _x];	//	one by one
	moveOut _x;	//	move out at once
	}foreach units _this;	
	//	hint "Eject";		
};

 

name a group like g_1

and add this in your trigger:

g_1 call GF_Eject;

 

and you can have a low flight , no touch down pass and exit :

https://community.bistudio.com/wiki/flyInHeight

https://community.bistudio.com/wiki/forceSpeed

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

Thank you for the help with this. I have found another way you can also use say when trigger detects player etc

man1 action["eject",plane1];
man2 action["eject",plane1];

man1 and plane1 are of course variables.

  • Like 1

Share this post


Link to post
Share on other sites

Hmm... maybe you will need this as well

 

isTouchingGround plane1;

 

otherwise the units might eject while the chopper is still in the air  :thumbsup:

  • Like 2

Share this post


Link to post
Share on other sites

please guys try to forget those setfuel 0 solution. this is crap because the engines are turned off then.

flyInHeight 0 pins every heli on ground once its landed and the engine keeps running....

  • Like 1

Share this post


Link to post
Share on other sites

Isn't there a "get out" waypoint? Except for the player himself, everything here can be achieved with waypoints only.

I encourage the OP to study waypoints documentation : correctly synchronised waypoints for both groups (chopper crew and cargo) should get you there.

 

But I'll admit, choppers are especially tricky to play with in mission making.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×