Jump to content
rtek

Heli Load Wait Till All Unit Loaded Before Takeoff

Recommended Posts

Workin on a Blufor heli sitting on the helipad waiting for team to finish gearing up. I have a waypoint for the team to Get In at the heli. I have a waypoint for the heli to Load right at the heli(if I put it anywhere but just behind the rotor the heli takes off), then I have both those waypoints synced. I need the heli to wait till my whole team and I are on board before it takes off.

Currently it sits there till I board, then it takes off whether my group is boarded or not. I need it to wait till my whole team is aboard then take off.

Any suggestions?

I saw this in cobra's extraction script

waitUntil {{_x in _heli} count (units _group) == {alive _x} count (units _group)};

I'm guessing this is what I need, how would this be written to put into the condition of the load waypoint in game? I put this as it is in there but came up saying Type Nothing, expected Bool.

paraheli is my heli and paragrp is my group.

Edited by RTEK

Share this post


Link to post
Share on other sites

Probably shouldnt have started a new thread for this and just asked your question in the other one you started. To answer your question you can just use a hold waypoint with a trigger. The trigger needs to be a switch and the condition would be checking to see if all of your group is in the helicopter.

Share this post


Link to post
Share on other sites

Hi RTEK,

Here's an example mission for you to show you how its done.

Example mission.

Cheers.

Workin on a Blufor heli sitting on the helipad waiting for team to finish gearing up. I have a waypoint for the team to Get In at the heli. I have a waypoint for the heli to Load right at the heli(if I put it anywhere but just behind the rotor the heli takes off), then I have both those waypoints synced. I need the heli to wait till my whole team and I are on board before it takes off.

Currently it sits there till I board, then it takes off whether my group is boarded or not. I need it to wait till my whole team is aboard then take off.

Any suggestions?

I saw this in cobra's extraction script

waitUntil {{_x in _heli} count (units _group) == {alive _x} count (units _group)};

I'm guessing this is what I need, how would this be written to put into the condition of the load waypoint in game? I put this as it is in there but came up saying Type Nothing, expected Bool.

paraheli is my heli and paragrp is my group.

Share this post


Link to post
Share on other sites

Or you can create a load waypoint directly over the helicopter with this as the condition:

{_x in heli} count (units group player) == {alive _x} count (units group player);

Then your next waypoint would be the transport unload with this as the condition:

{_x in heli} count (units group player) == 0;

Then to clean it all up send your helicopter off and delete it, move waypoint with on act:

{deleteVehicle _x} forEach (crew heli) + [heli]

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

Cobra, thanks again for the help. Partyhead, thank you for the example mission with the use of a trigger. Both methods work great. Thanks again.

---------- Post added at 20:52 ---------- Previous post was at 20:09 ----------

Cobra, I have a question regarding your HALO script. My team dies on landing from the parajump that uses the trigger to eject the team. It doesnt happen all the time, but the AI don't flare up just before landing. I have them jumping out at 200m. Is that too low, is the helo moving too fast, or is it just an issue with A3 AI?

Is there any way to make the AI invulnerable on landing so they don't die?

Share this post


Link to post
Share on other sites

Yes they need to be set to allowdamage false upon exiting, then once they are on the ground set them to allowdamage true. I had problems with the paradrop making the helicopter sometimes crash. I will look at it again later tonight and send you a PM.

Share this post


Link to post
Share on other sites

s1 allowDamage false;s2 allowDamage false;s3 allowDamage false;s4 allowDamage false;s5 allowDamage false;s6 allowDamage false;this setpos [getpos this select 0, getpos this select 1,(getpos this select 2) +20]; this flyinheight 20; this setvelocity [0,0,0]

they stay alive if I use this in a trigger at their drop area, then use

s1 allowDamage true;s2 allowDamage true;s3 allowDamage true;s4 allowDamage true;s5 allowDamage true;s6 allowDamage true  

outside the safezone.

Found that in an old helocasting template on armaholic. had to edit the opfor heli with the current name so I could open in editor. But it works. So I"m going to test this out in my mission with the halo script.

Just tried it and it fixes my issue. Also removed the set velocity on the helo so it's not moving so fast.

Edited by RTEK

Share this post


Link to post
Share on other sites

Ok I have tried numerous ways to get a helicopter to land and load me and my friends without having to use transport module. Cobra I have added the script you have posted I have used a trigger linked to the move WP after load with this in condition

((!alive Unit1) or (Unit1 in rescue1)) and ((!alive Unit2) or (Unit2 in rescue1)) and ((!alive Unit3) or (Unit3 in rescue1)) and ((!alive Unit4) or (Unit4 in rescue1))
but every time as soon as one player gets in the chopper it takes off and goes to next waypoint or if i use script notes it hovers and goes no where. Please help. I would like to have a chopper come in land pick up all my troops then follow waypoints to unload them and then wait for trigger to bring chopper back in for evac.

Share this post


Link to post
Share on other sites

You don't need the trigger.

In the Team Leaders init put this

alpha = group this;

Just in front of the LOAD waypoint have a MOVE waypoint with this in it's condition field

({!(alive _x) || _x in heli} count (units alpha)) == count (units alpha);

Heli won't take off until all alive units of group alpha are in.

Share this post


Link to post
Share on other sites

Yeah tried that as well and still takes off with out players

Share this post


Link to post
Share on other sites

I finally got it to work using my original script

Share this post


Link to post
Share on other sites
On 16/02/2014 at 10:55 AM, cobra4v320 said:

Or you can create a load waypoint directly over the helicopter with this as the condition:

 


{_x in heli} count (units group player) == {alive _x} count (units group player);
 

 

Then your next waypoint would be the transport unload with this as the condition:

 


{_x in heli} count (units group player) == 0;
 

 

Then to clean it all up send your helicopter off and delete it, move waypoint with on act:

 


{deleteVehicle _x} forEach (crew heli) + [heli]
 

 

 

1) Created a load waypoint directly over the helicopter with this in the condition field.

{_x in heli} count (units group player) == {alive _x} count (units group player);

 


2) Then your next waypoint would be the transport unload with this as the condition.

{_x in heli} count (units group player) == 0;

 


3)Then to clean it all up send your helicopter off and delete it, move waypoint on act.

{deleteVehicle _x} forEach (crew heli) + [heli]

 


I tried that and nothing. The poster on the BI forums didn't mention if I had to change certain things. So I just copied and pasted.

I tried this too:

1) In the Team Leaders init put this.

alpha = group this;


2) Just in front of the LOAD waypoint have a move waypoint with this in its condition field.

({!(alive _x) || _x in heli} count (units alpha)) == count (units alpha);

Share this post


Link to post
Share on other sites
On 2/16/2014 at 12:55 AM, cobra4v320 said:

Or you can create a load waypoint directly over the helicopter with this as the condition:

 


{_x in heli} count (units group player) == {alive _x} count (units group player);
 

 

Then your next waypoint would be the transport unload with this as the condition:

 


{_x in heli} count (units group player) == 0;
 

 

Then to clean it all up send your helicopter off and delete it, move waypoint with on act:

 


{deleteVehicle _x} forEach (crew heli) + [heli]
 

 

How does this work? Ive tried everything and it doesnt work

  • Like 1

Share this post


Link to post
Share on other sites
5 hours ago, beetlejuice8498 said:

How does this work? Ive tried everything and it doesnt work

 

#First Post ?!

 

Welcome to BIS Forums !

 

 

Try:

waitUntil {{_x in _your_Heli} count [_your_unit] > 0};

 

Share this post


Link to post
Share on other sites

This is the simplest method of helicopter pickup and drop off without any scripting involved.

 

u91z6yo.jpg

  • Like 2

Share this post


Link to post
Share on other sites

cobra4v320, thank you for the excellent and simple diagram. As per usual with ARMA, it seems like it should work, but it doesn't. Replicating the set up exactly, the heli picks up correctly and moves to the unload waypoint, but never lands to drop off the loaded infantry, just hovers. 

Am I missing a detail or something?

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

×