Jump to content
Sign in to follow this  

Recommended Posts

Hello guys, another question here. Now I have searched around for the answer to this and I've gone over my previous threads about this but nothing pops up.

I need a helicopter (UH-60M) named "extractionHelo" to move to a waypoint, land, wait for some players to enter (it's a multiplayer mission) and then fly to another location and drop them off then return home.

Now, I have some waypoints made up:

0 - A Move waypoint situated very close to the chopper just so the engines start running before it is released so it doesn't fall into the sea (it starts on a destroyer)

1 - A Get In waypoint on an island. This is where the helo lands to let the troops embark.

2 - An Unload waypoint on the mainland that the troops get out on. It has the following code:

{_x in extractionhelo} count units group player == count units group player;

3 - Another Move waypoint back at the destroyer. I don't need it to land.

Now, as it's a multiplayer mission the problem might be that the groups are coded into that line above as "player".

In the inti lines of the group leaders in my 2 squads I have:

this moveInDriver boat2; FT2 = createGroup WEST; leader2 setGroupId ["FT2"]; nul = execVM "leaderLoadout.sqf";

NOTE: "FT2" and "boat2" can have the 2 exchanged with 1.

Ca anyone think of any way to rectify this and make it work? I've tried:

{_x in extractionhelo} count units group FT1 && FT2 == count units group FT1 &&FT2;

But it just doesn't seem to work.

Thanks all,

Bashkire

Share this post


Link to post
Share on other sites

replace FT2 = createGroup WEST; leader2 setGroupId ["FT2"]; with:

groupname = group this;

now replace group player with groupname

condition can also be this to account for casuallties and unforseen actions.

({alive _x OR _x in extractionhelo} count units groupname) == ({alive _x} count units groupname)

maybe even a foreach condition will work as well:

{!alive _x OR _x in extractionhelo} foreach units groupname

Edited by Demonized

Share this post


Link to post
Share on other sites

well, this is how i did it on a MP mission on dedi server awhile ago, and it worked.

1: heli somewhere named heli1

2: pilot outside heli lying on stealth neverfire with a hold wp on his position.

3: a switch trigger wich triggers the hold wp and does this code:

pilot1 assignAsDriver heli1; pilot moveInDriver heli1;

4: another hold wp near a inv h where the pickup is going to happen.

and a switch trigger with condition:

({_x in heli1 OR !alive _x} count units groupname) == (count (units groupname))

5: a trigger was near the wp covering the area, in on act it had:

heli1 land "GET IN";

6: in init of leader of the player group i had

groupname = group this;

7: next wp of pilot was the transport unload near a inv h and another trigger near with heli1 land "GETOUT"; {if ((group _x) != groupname) then {unassignVehicle _x}} foreach crew heli1;

8: heli1 wp back to start and delete it.

Edit: im writing from memory and my coding was very virgin back then, but it worked, trial and error is the way to figure out if your script works or not.

this is a great tool for pre testing your MP missions

Tophe's ArmA 2 Dedicates Server Tool

Edited by Demonized

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  

×