Forum Jump :

Author Message


Posts: 28
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2016-01-08 23:40        
     
I have a missin which involes a heli pickup and drop off. For the pick up, the heli lands, and takes off once all squad members are in the heli. I do this with:

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

now i am just looking for a way to reverse this so that when the heli lands and all my squad and me get out, then the heli leaves. Basically i need this same kind of code to check if my squad are NOT in heli1

Thanks in advance for any help you guys will bring.

Added 18 minutes later:

SOLVED
Instead i just thought to myself that the code i was using was counting how many people were in my squad and then checking it they were all in the heli. so i just changed it to:
{_x in heli1} count (units group player) == 0

Added 5 minutes later:

UPDATE
I thought that solved it but it didn't

Added 51 seconds later:

I still need a way to reverse
{_x in heli1} count (units group player) == {alive _x} count (units group player);

This post was edited by Joshua100801 (2016-01-09 00:05, 708 days ago)


Author Message


Posts: 1189
Rank:


Level: Member

Country: tr
Location:
Occupation: Computer Science student
Age: 20
In-game name: Wak

 
#2 Posted at 2016-01-09 00:27        
     
You can try these for mount and dismount respectively:
count (assignedCargo heli1) == {alive _x} count (units player);

count (assignedCargo heli1) == 0;

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

#define getDamage getDammage

Advertisement


Author Message


Posts: 28
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2016-01-09 00:29        
     
Thanks 654walk654
Your the same guy who coded my death_counter.sqf


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 57
In-game name: Kobayashi Maru

 
#4 Posted at 2016-01-09 09:06        
     
Thanks Wak
I don't have problem with:
{_x in heli && alive _x} count (units player)==0;
did I miss something or is it another solution? I did that because I thought assignedCargo didn't mean "in" but "intended to be in" cargo. This could be different in some cases (heavy group cinematic).

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Author Message


Posts: 1189
Rank:


Level: Member

Country: tr
Location:
Occupation: Computer Science student
Age: 20
In-game name: Wak

 
#5 Posted at 2016-01-09 11:17        
     
Pierre I just assumed they'd be assigned because the player is ordering them to get in, rather than a script using moveInCargo. Joshua could also have used a GET IN waypoint or similar, doesn't really matter. Everything except moveInCargo also assigns the units.

Of course assignedCargo isn't reliable all the time, for example if you started a mission with all the units in a vehicle that were put there with moveInCargo, using assignedCargo to check if they all dismount could be unreliable. I'm saying could because after a time all the units that were forced in to cargo will also "sync" and be assigned.

You know it's just classic BI bullshit that keeps you up at night.

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

#define getDamage getDammage