Jump to content
Sign in to follow this  
spookygnu

Getting Multiple boats empty??

Recommended Posts

this is a slightly unique situation I'm trying to create here.

I'm currently using unitCapture for 4 speedboats to arrive at the shoreline in two different locations and then offload the units onto the beach.

I can however manage to empty the boat I am in if I assign a waypoint and use;

{unassignvehicle _x; dogetout _x} foreach units group player;

Within the waypoint activation. this does work on a few occasions but not always. I think it is something to do with the lead unit not recognising he is at the waypoint yet. Possibly due to him being preoccupied within a gunfight. Anyway, the three other boats don't tend to follow the same procedure although I would like them too.

somethings I am thinking about is this;

Carry on as it is and have all the boats empty all at the same time.

or

Re-Record the boats paths and give a little more time on the shoreline still having all the boats empty at the same time.

or

Re-record and have the boats cover each other as one drops its team off on the shore. The other would cover fire then rotate the disembark.

any help on a solution to getting the boats empty or suggestions on my three options please would be much appreciated.:)

Share this post


Link to post
Share on other sites

Do all the boats need to empty at the exact same time? I think it'd be more realistic if they all arrived at the beach around the same time, with the units disembarking once their boat reaches the shore. Nonetheless, if you wanted to get all of the units to disembark at the same time you could use:

//code assumes all the boats are named using the editor
{
if (alive _x) then //dead units can't get out so there's no point in wasting processing time ordering them to
{
	unassignVehicle _x;
	doGetOut _x;
};
}forEach ((crew boat1) + (crew boat2) + (crew boat3) + (crew boat4));

Share this post


Link to post
Share on other sites
Do all the boats need to empty at the exact same time? I think it'd be more realistic if they all arrived at the beach around the same time, with the units disembarking once their boat reaches the shore.

Yeah that is what I have at the moment, two in one location and two in another. I used unit capture to follow each boat and tried to give a slight pause to allow for disembark for each team once on the shore. I'll give this a shot and let you know. thanks!

---------- Post added at 20:12 ---------- Previous post was at 19:45 ----------

that code DreadedEntity works, but I want to ask you this if you don't mind.

If I place a trigger on each boat LZ, then execute the same script for each boat in its own trigger. Would I change this;

}forEach ((crew B1) + (crew B2) + (crew B3) + (crew B4));

to this

}forEach crew boatName;

in each script??

---------- Post added at 20:45 ---------- Previous post was at 20:12 ----------

ok just tried another unit capture of the boats and I was driving, thing I noticed is the crew disembark, I don't actually want this. I only need the passengers.

Each team is assigned as group name, alpha, bravo, charlie and delta. The crews I want to drive the boats away after the teams get out.

What I'm actually doing is capturing the boat insertion as the driver and waiting til the whole team is out and then I'll drive away. then in Playback the pause will be long enough for the teams to get out and the boats to get away. At this point the player unit will be one of the units in the team ashore in the firefight.

---------- Post added at 21:52 ---------- Previous post was at 20:45 ----------

Found this post on Armaholic. It seems to do just what I'm looking for.

http://www.armaholic.com/forums.php?m=posts&id=98686

with a bit of tweaking on the unit capture I can get it working no problem.

Share this post


Link to post
Share on other sites

modifying code from DreadedEntity, using assignedCargo to get only passengers of boat.

//code assumes all the boats are named using the editor
{
{
	_boat = _x;
	//dead units can't get out so there's no point in wasting processing time ordering them to
	if (alive _x AND _x in (assignedCargo _boat)) then {
		unassignVehicle _x;
		doGetOut _x;
	};
} foreach crew _x;
} forEach [boat1, boat2, boat3, boat4];  

Share this post


Link to post
Share on other sites

thanks for the response on my query fellas.

I got it working with a bit of research and your assistance and I came up with just using a trigger for each boat LZ and in the trigger I placed;

 {unassignvehicle _x; dogetout _x} foreach units alpha;

in the init of each trigger, changing the group name respectively. I re-recorded the unit capture of me driving the boats so that there was enough time for the units to get out. Works great now! Cheers guys!

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  

×