Forum Jump :

Author Message


Posts: 1
Rank:


Level: Member

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

 
#1 Posted at 2015-12-27 03:05        
     
Hello, im trying to make a small part of a mission where Marines are boarding an Osprey, but not all at once.
It is based on the Half life: Opposing Force chapter "We are pulling out", when the marines are boarding the osprey.

How it plays out.
1. The player enters the area, and one of the marines runs into the osprey.
2. A little later, another marine runs in, etc.
3. After all of the marines have boarded, the Osprey takes off and flies to the landing zone.

But how do I have the marines enter the osprey at delayed times, and so the osprey takes off after they have all boarded?
Thanks.

Toaster PC's have souls.

Author Message


Posts: 1589
Rank:


Level: Member

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

 
#2 Posted at 2015-12-27 07:38        
     
You have to identify your marines, in a group or allplayers (blue side) or in an array _my_array = [marines1,marines2,...];
then wait until they are boarded in Osprey (say helo1)
if the Osprey comes to pick up your guys on a waypoint, after After Osprey reaches the waypoint:

waituntil {0.5; unitReady helo1};
helo1 land "get in";
waituntil {sleep 0.5; {side _x == west && _x in helo1} count allPlayers == ({side _x == west && alive _x} count allPlayers)};
or
waituntil {sleep 0.5; {group _x == _marines && _x in helo1} count allPlayers == ({group _x == _marines && alive _x} count allPlayers)};
or, if some AI in your group change allPlayers for allUnits or count [marines1, marines2... ];

after that;
_wpt = group_helo1 addWaypoint [a_position,0];
_wpt setWaypointType "MOVE";
_wpt setWaypointBehavior "SAFE";
...
Note: land and unitReady are used on the helicopter itself, addwaypoint is always used on a group. You have to define it, if not already done:
group_helo1 = group (driver helo1); for example.

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





Tags: Marines, Osprey