Jump to content
Sign in to follow this  
kocrachon

Helicopter leaving with out the squad.

Recommended Posts

So I have a helicopter that is sitting on the Tarmac waiting for the squad it is transporting to get in.

Right now the UH-60 is sitting on the Tarmac with a dostop command. Works Perfectly Fine.

I command all of my squad to get in, its still sitting their, I get in, and it takes off. HOWEVER.

If I, the SQUAD LEADER, get in FIRST, it takes off with out the rest of the squad.

Everyone in my squad has this in their init

squad1 = group this

and the trigger that command the UH-60 has this in its condition field

({ (not (_x in bird1)) and (alive _x) } count (units (squad1))) == 0;

So is there any way to get it to not take off the instant the squad leader gets in? Also keep in mind I dont want to us this method

Soldier1 in Bird1 && Soldier2 in Bird1 etc etc

Because if I do that, and I dont have players in every slot, then it wont take off because it is waiting for Soldier6 who isnt alive because I only have 5 players.

Share this post


Link to post
Share on other sites

Not sure why your condition is not working and I am unaway from my gaming rig to test, but it seemed to be a little more complex than it need to be. Again, this is untested, but maybe something like this:

((count crew bird1) -1) == (count (units group squad 1))

This take the count of units in bird1 (and subtracts 1 to account for the pilot (so if you have gunners or other crew already in place subtract one more for each)) and compares it to the number of units in the group. You shouldn't have to check if a unit in the group is alive because if I recall correctly dead units return groupNull. Good luck!

Edited by Loyalguard
typo

Share this post


Link to post
Share on other sites

ive gotten a little rusty recently because i havent had a go at creating a map in months but i remember using a helicopter in the way that you want. and i used the code

(unitname in choppername)

which you put in the condition for waypoint, i think, and it checks that the set unit is in your chopper before moving on and combined it with the code

(unitname !alive)

which checks if the unit is dead(not alive).

im sorry i cant remember exactly how i had it set up but it if somebody else can help me out with the explination of how to use them correctly it means that the helicopter will sit and wait untill all the players you tell it to wait for in the chopper before moving off, and if any players are killed before getting in it wont wait for them.

Share this post


Link to post
Share on other sites
Not sure why your condition is not working and I am unaway from my gaming rig to test, but it seemed to be a little more complex than it need to be. Again, this is untested, but maybe something like this:

((count crew bird1) -1) == (count (units group squad 1))

This take the count of units in bird1 (and subtracts 1 to account for the pilot (so if you have gunners or other crew already in place subtract one more for each)) and compares it to the number of units in the group. You shouldn't have to check if a unit in the group is alive because if I recall correctly dead units return groupNull. Good luck!

didnt work, tells me this

((count crew bird1) -1) == (count (units |#|group squad1))

type group, expected objects...

Share this post


Link to post
Share on other sites

In your condition line use:

({_x in bird1} count units squad1) == (count units squad1)

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
Sign in to follow this  

×