Jump to content
_qor

"Transport unload" with groups

Recommended Posts

There is one heli with a "HOLD" waypoint synchronized with a trigger, which makes the heli fly to a certain waypoint when a certain unit is dead.

But then I want the heli to load 2 groups and unload only them at the waypoint. This is possible by the "TRANSPORT UNLOAD" waypoint so far. The only way I found to make this possible, is by set each unit to "in cargo" and group it with the heli. Unfortunately the actual groups dont exist anymore this way.

So when the heli alights, all the units (instead of the pilots etc.) disembark, but are single units.

I want them to stay in their groups. How do I do that?

Share this post


Link to post
Share on other sites

Hi _qor,

An example mission I made for you can be found here. Just throw the extracted folder into your missions folder in "my documents\ArmA 2 Other Profiles\username\Missions" so you can view it in the editor.

Feel free to do whatever with it if it is kind of what you are trying to do [just modify "unload.sqf"]. It is scripted, but is easy to modify. I am not sure of your scripting knowledge, but if you are not sure how I will help you out. Otherwise just basically use the information from the setWaypointStatements fields into the relevant mission editor waypoint fields.

Basically instead of using the radio trigger to call the insertion, just either change the trigger activation to (!(alive nameofGuywhodies)).

To do what you are trying to do there are a number of considerations. Basically you need to change the behaviour of the helicopter to ignore any potential targets it see's on the way to the insertion. Otherwise it will forget temporarily what it is supposed to be doing and can be unpredictable in its actions.

You can get around this by adding in the helo's init: this setbehaviour "SAFE"; this disableAI "TARGET"; this disableAI "AUTOTARGET"; this setCombatMode "BLUE";

Trouble with that is the gunners will not engage during the course of the landing which is not realistic IMHO.

I hope that helps.

EDIT: I am just editting the mission, as I just read you want two groups to be inserted at the insertion point. - > DONE!

Thanks

Rough Knight

Edited by Rough Knight

Share this post


Link to post
Share on other sites

Okay thanks a lot j_frost, but I cant actually open the mission due to I only got Arma2: RFT which does not includes the island Utes.

Dont know how complicated my demand is, but isnt it more easy to just scribble it down in this case?

Share this post


Link to post
Share on other sites

Don't group the units to the helicopter.

Give each group a GET IN and a MOVE waypoint

Helicopter LOAD, TRANSPORT UNLOAD, MOVE waypoints

put the LOAD & TRANSPORT UNLOAD wps on Object : H (invisible)

Sync both GET IN wps with the LOAD wp.

The 2 different groups will get in the helicopter at LOAD and get out as 2 groups at the TRANSPORT UNLOAD.

You need to search - that info is listed many times on these forums.

If you want the groups to start in the helicopter - do what j_frost says below and omit the GET IN and LOAD part from above:

3). In both leaders init fields put: {_x assignasCargo helo} foreach units group this; {_x moveincargo helo} foreach units group this;
Edited by PELHAM

Share this post


Link to post
Share on other sites

Although pelhams method is probably easier, here is what to do with my script if you want to use it.

1). Add a helo to your map, give it a name ie helo.

2). Add your two groups give both the leaders a name ie. leader1 and leader2

3). In both leaders init fields put: {_x assignasCargo helo} foreach units group this; {_x moveincargo helo} foreach units group this;

4). Add one marker where the helo starts and finishes from and give it a name i.e. "marker1"

5). Add one marker where the helo flys to (insertion point) and give it a name i.e. "marker2"

5). Add one marker where the inserted sqaud is to goto when they disembark i.e. "marker3"

6). add the following to a trigger [your dead dudes name is for example mydeaddude]

7). Edit the unload.sqf chats [at the bottom of the script] or delete them if you don't want your squad leaders to say something when they disembark

triger [axis a & b]: 0

trigger [activation]: none

trigger [condition:] !(alive mydeaddude)

trigger [on act:] nul = [helo, leader1, leader2, "marker1", "marker2", "marker3"] execVM "unload.sqf";

unload.sqf

//Script to drop troops at a location then order them to go somewhere.
//See desctiption for array fields below. Called by:
//nul = [helo, leader1, leader2, "marker1", "marker2", "marker3"] execVM "unload.sqf";  

_helo 		= _this select 0;	// Name of you helo
_leader1 	= _this select 1;	//Name of the 1st inserted squads leader
_leader2 	= _this select 2;	//Name of the 2nd inserted squads leader
_marker1	= _this select 3;	//marker for chopper to return to (perhaps also start from)
_marker2	= _this select 4;	//marker for insertion location
_marker3	= _this select 5;	//marker to tell troops where to go when insertion is complete

_pilot		= driver _helo;

[_pilot] joinsilent grpNull;

_group		= group _pilot;

sleep 0.1;
//Ensure pilot will not engage enemy and actually land at location.
//The following code makes pilot not engage, but allows gunners to still fire (they are no longr part of pilots group)
unassignVehicle _pilot;
_pilot disableAI "AUTOTARGET"; 
_pilot disableAI "TARGET"; 
_pilot allowDamage false; 
_pilot setBehaviour "careless"; 
_pilot allowFleeing 0; 
_pilot disableAI "FSM"; 
_pilot assignAsDriver _helo; 
_pilot moveindriver _helo; 

_helo allowFleeing 0;
_helo setfuel 1;
_helo setdamage 0;
_helo setCaptive true;

waituntil {_pilot in _helo};
//hint format ["name of helo driver is: %1", name _pilot];

_h1 = "HeliHEmpty" createvehicle (getMarkerPos _marker2);
_waypoint0 = _group addWaypoint [(getMarkerPos _marker2), 0];
[_group, 0] setWaypointType "MOVE";
_waypoint0 setWaypointStatements ["true", format ["%1 land ""land""; {[_x] orderGetIn false; unassignVehicle _x} foreach units group %2; {[_x] orderGetIn false; unassignVehicle _x} foreach units group %3", _helo, _leader1, _leader2]];

_waypoint1 = _group addWaypoint [(getMarkerPos _marker2), 1];
[_group, 1] setWaypointType "TR UNLOAD";
_waypoint1 setWaypointStatements [format ["(({(alive _x) && (_x in %1)} count units group %2 == 0) && ({(alive _x) && (_x in %1)} count units group %3 == 0))", _helo, _leader1, _leader2], ""];

_h2 = "HeliHEmpty" createvehicle (getMarkerPos _marker1);
_waypoint2 = _group addWaypoint [(getMarkerPos _marker1), 2];
[_group, 2] setWaypointType "MOVE";
_waypoint2 setWaypointStatements ["true", format ["%1 land ""land"";", _helo]]; 


//Code to make units inserted do whatever you want them to.
//wait until unit has jumped out of chopper at location.
while {(_leader1 in _helo) || ((_leader1 distance (getMarkerPos _marker2)) > 100) || (_leader2 in _helo) || ((_leader2 distance (getMarkerPos _marker2)) > 100)} do {sleep 1;};

//Waypoint for squad one
_waypoint3 = (group _leader1) addWaypoint [(getMarkerPos _marker3), 0];
[(group _leader1), 0] setWaypointType "SAD";
[(group _leader1), 0] setWaypointCombatMode "RED";
[(group _leader1), 0] setWaypointBehaviour "COMBAT";
[(group _leader1), 0] setWaypointSpeed "LIMITED";
[(group _leader1), 0] setWaypointFormation "LINE";
_waypoint3 setWaypointStatements ["true", ""];

//Waypoint for squad two.
_waypoint4 = (group _leader2) addWaypoint [(getMarkerPos _marker3), 0];
[(group _leader2), 0] setWaypointType "SAD";
[(group _leader2), 0] setWaypointBehaviour "COMBAT";
[(group _leader2), 0] setWaypointFormation "COLUMN";
_waypoint4 setWaypointStatements ["true", ""];

//Leader one chat
hint parseText format["<t color='#00FFFF'>Master Sargeant<br/>%1:</t><br/><br/>Fall into line squad...Move to the objective...Engage at will!!", name _leader1];

sleep 10;
//Leader two chat
hint parseText format["<t color='#00FFFF'>Master Sargeant<br/>%1:</t><br/><br/>Lets move team...Eyes sharp, this is hostile territory!!", name _leader2];

Edited by Rough Knight

Share this post


Link to post
Share on other sites

I just let the groups as they are and told them via waypoints to enter the helicopter, which takes off later during the mission.

The "Transport unload" waypoint finally unload the 2 groups at the designated position on map.

thats just it. seems 2 oclock at morning was not the time of simple solutions ;)

Share this post


Link to post
Share on other sites

I'm not sure if anyone even reads ARMA 2 threads but I just got back into PC military gaming after a long time overseas. So I am literally stuck back in the Battlefield 1942, original Ghost Recon and OFP Cold War, days.

I bought a Acer Predator laptop as I have to move a lot. I thought Arma 3 would play fine cause EVERY other game I play, plays smoothly. My Arma stutters, I do not think it's a FPS problem (the start up video for museum even stutters.) I have been trouble shooting this on my own and with Bohemia CS. With no progress, or little.

So I am stuck playing my Arma 2, actually shitty internet wherever I go so never multiplayer.  I'm ok with that (for now) but I know nothing of scripting or anything.

My made missions are duck taped with a bunch of waypoints and limited orders cause I still have no clue how to fully utilize the editor to create a realistic simulated mission. I would love to learn. If anyone is reading this and is patient with a man whose knowledge is very limited on computers in general, let alone Arma 2 details.

I would appreciate your help.

Farinaccitony5@gmail.com 

I appreciate your help in advance

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

×