Jump to content

Recommended Posts

Hello,

I'm working on a Free War mission where I want a QRF (rhs_group_rus_msv_btr70_squad) to spawn in, get in their vehicle (BTR-70), then head to a waypoint before unloading the troops. I've tampered with a whole bunch of things but to no avail. This is the code I'm currently using:
Rwy_Bridges_1_QRF.sqf:

Rwy_Bridges_1_QRF = [ getMarkerPos "Rwy_Bridges_1_QRF_Spawn", EAST, (configFile >> "CfgGroups" >> "East" >> "rhs_faction_msv" >> "rhs_group_rus_msv_btr70" >> "rhs_group_rus_msv_btr70_squad")] call BIS_fnc_spawnGroup;

Rwy_Bridges_1_QRF_Spawn = Rwy_Bridges_1_QRF addWaypoint [getMarkerPos "Rwy_Bridges_1_QRF_Spawn", -1];
Rwy_Bridges_1_QRF_Spawn setWaypointType "GETIN";

Rwy_Bridges_1_QRF_WP1 = Rwy_Bridges_1_QRF addWaypoint [getMarkerPos "Rwy_Bridges_1_QRF_WP1", -1];	
Rwy_Bridges_1_QRF_WP1 setWaypointType "MOVE";

Rwy_Bridges_1_QRF_WP2 = Rwy_Bridges_1_QRF addWaypoint [getMarkerPos "Rwy_Bridges_1_QRF_WP2", -1];
Rwy_Bridges_1_QRF_WP2 setWaypointType "GETOUT";

The above code will spawn in the squad but instead of getting into their vehicle, they stay disembarked as they move to "Rwy_Bridges_1_QRF_WP1".

 

Any help would be appreciated as I'm all out of ideas of how to make this work as I want it to.

Best regards,

Garmrr

Share this post


Link to post
Share on other sites

you can simplify this by simply moving them into the vehicle instead of relying on the getin waypoint. i guess it depends on whether players would be able to see the vehicle at its starting point.

 

next, create a separate group for the vehicle driver, and give him a "transport unload" waypoint

 

next, add a move waypoint to the QRF group. discard the "Getout" waypoint, as they will disembark via the "transport unload" waypoint.

 

Share this post


Link to post
Share on other sites
7 minutes ago, fn_Quiksilver said:

you can simplify this by simply moving them into the vehicle instead of relying on the getin waypoint. i guess it depends on whether players would be able to see the vehicle at its starting point.

 

next, create a separate group for the vehicle driver, and give him a "transport unload" waypoint

 

next, add a move waypoint to the QRF group. discard the "Getout" waypoint, as they will disembark via the "transport unload" waypoint.

 

Hello,

Thank you for your answer.

Players will not be able to see the vehicle when it spawns in. I hope you will excuse my ignorance, but how exactly do I complete these steps? I'm still very new to scripting in .sqf.

 

I tried the following code as well just now:

 

Trigger condition: (Rwy_Bridges_1_Defense knowsAbout player) > 2;
Trigger On Activation: execVM "scripts\Rwy_Bridges_1_QRF_BTR.sqf"; execVM "scripts\Rwy_Bridges_1_QRF_INF.sqf";

 

Rwy_Bridges_1_QRF_BTR.sqf:

Rwy_Bridges_1_QRF_BTR = [ getMarkerPos "Rwy_Bridges_1_QRF_Spawn", 0, "rhs_btr70_msv", EAST] call BIS_fnc_spawnVehicle;

sleep 10;

Rwy_Bridges_1_QRF_WP1 = Rwy_Bridges_1_QRF_BTR addWaypoint [getMarkerPos "Rwy_Bridges_1_QRF_WP1", -1];
Rwy_Bridges_1_QRF_WP1 setWaypointType "TR UNLOAD";

 

Rwy_Bridges_1_QRF_Inf.sqf:

Rwy_Bridges_1_QRF_Inf = [ getMarkerPos "Rwy_Bridges_1_QRF_Spawn", EAST, (configFile >> "CfgGroups" >> "East" >> "rhs_faction_msv" >> "rhs_group_rus_msv_infantry" >> "rhs_group_rus_msv_infantry_squad")] call BIS_fnc_spawnGroup;

Rwy_Bridges_1_QRF_Spawn = Rwy_Bridges_1_QRF_Inf addWaypoint [getMarkerPos "Rwy_Bridges_1_QRF_Spawn", 20];
Rwy_Bridges_1_QRF_Spawn setWaypointType "GETIN NEAREST";

 

The units spawn in but neither of them move anywhere (except the squad falls into wedge formation).

Share this post


Link to post
Share on other sites
1 hour ago, fn_Quiksilver said:

you can simplify this by simply moving them into the vehicle instead of relying on the getin waypoint.

moveInCargo

Share this post


Link to post
Share on other sites

Hello,

With extensive help from Lou Montana and Muzzleflash on the Arma 3 Discord, I've managed to get this script working.
 

Rwy_Bridges_1_QRF.sqf:

Rwy_Bridges_1_QRF_BTR = [ getMarkerPos "Rwy_Bridges_1_QRF_Spawn", 0, "rhs_btr70_msv", EAST] call BIS_fnc_spawnVehicle;
rwy_bridges_1_qrf_btr_veh = (Rwy_Bridges_1_QRF_BTR select 0);

_wp1 = (Rwy_Bridges_1_QRF_BTR select 2) addWaypoint [(getMarkerPos "Rwy_Bridges_1_QRF_WP1"), 0];
_wp1 setWaypointType "TR UNLOAD";

(Rwy_Bridges_1_QRF_BTR select 2) deleteGroupWhenEmpty true;

Rwy_Bridges_1_QRF_Inf = [ getMarkerPos "Rwy_Bridges_1_QRF_Spawn", EAST, (configFile >> "CfgGroups" >> "East" >> "rhs_faction_msv" >> "rhs_group_rus_msv_infantry" >> "rhs_group_rus_msv_infantry_squad")] call BIS_fnc_spawnGroup;

private _groupUnits = units Rwy_Bridges_1_QRF_Inf;
{
    _x assignAsCargo Rwy_Bridges_1_QRF_BTR_Veh;
    _x moveInCargo Rwy_Bridges_1_QRF_BTR_Veh;
} forEach _groupUnits;

Rwy_Bridges_1_QRF_Inf delteGroupWhenEmpty true;

 

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

×