Forum Jump :

Author Message


Posts: 508
Rank:


Level: Member

Country: se
Location:
Occupation:
Age: 24
In-game name: Oksman

 
#1 Posted at 2012-04-26 15:50        
     
Hello Armaholic, been gone for a while and now I'm back in business and starting my little campaign!

Anyhow to give you the background of my little problem, I've done UnitRecord/Unitplay for a more realistic type of landing for a helicopter.

The problem is, If I do just 1 recording of me landing and then wait 20 seconds for the player and it's team to get out of the helo, there wouldn't be a failsafe say someone forgot to press disembark for the team or anything like that.

Therefor I've come up with an idea using 2 recorded paths, first one "Land on the LZ" will be triggered by the init.sqf, this will land the helicopter at the HLS.

The second path that takes the helo out of the area should be triggered 5 seconds after the WHOLE team have left the helicopter.

To the problem:
I don't know how to check the value/condition of the group, to see if it's inside or outside the helicopter.

I tried using
!b1 in helo;

B1 being one of my units
That did not work out, so I'm basically asking for how to check if a unit is outside an helicopter.

Regards Oksman


Author Message

W0lle  

call me evil


Posts: 1944
Rank:


Country: de
Location:
Occupation: CWR² Project Lead
Age: 101
In-game name:

 
#2 Posted at 2012-04-26 17:14        
     
Check if a group is inside a vehicle:
({_x in xhelo} count units xgroup) == (count units xgroup)

Check if a group is not inside a vehicle:
{_x in xhelo} count (units xgroup) ==  0

xhelo is the name of the vehicle
xgroup is the name of the group


Advertisement


Author Message


Posts: 508
Rank:


Level: Member

Country: se
Location:
Occupation:
Age: 24
In-game name: Oksman

 
#3 Posted at 2012-04-26 19:14        
     
Ah ofc, count!

Thanks W0lle