DrPastah – User
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) (Update) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{UserDefaultPage}} | |||
== Helicopter Transport Script == | == Helicopter Transport Script == | ||
< | |||
<sqf> | |||
// The Landing needs to be a helipad object. You can use an invisible helipad. | |||
spawnTransportQRF = { | spawnTransportQRF = { | ||
_spawn = _this | _spawn = _this select 0; | ||
_lz = _this | _lz = _this select 1; | ||
_exit = _this | _exit = _this select 2; | ||
// Helicopter with pilots | |||
_heliGroup = | _heliGroup = createGroup WEST; | ||
_heli = | _heli = createVehicle ['RHS_UH1Y_UNARMED_d', _spawn, [], 300, 'FLY']; | ||
_pilot = _heliGroup | _pilot = _heliGroup createUnit ['rhsusf_usmc_marpat_d_helipilot', _spawn, [], 300, 'CAN_COLLIDE']; | ||
_pilot setRank 'PRIVATE'; | _pilot setRank 'PRIVATE'; | ||
_copilot = _heliGroup | _copilot = _heliGroup createUnit ['rhsusf_usmc_marpat_d_helipilot', _spawn, [], 300, 'CAN_COLLIDE']; | ||
_copilot | _copilot setRank 'PRIVATE'; | ||
// Put pilots in chopper | |||
_pilot | _pilot moveInDriver _heli; | ||
_copilot | _copilot moveInAny _heli; | ||
_heliGroup | _heliGroup setFormation 'WEDGE'; | ||
_heliGroup | _heliGroup setBehaviour 'SAFE'; | ||
_heliGroup | _heliGroup setSpeedMode 'NORMAL'; | ||
// Fireteam | |||
_team = | _team = createGroup WEST; | ||
_newUnit = _team | _newUnit = _team createUnit ['rhsusf_usmc_marpat_d_teamleader', _spawn, [], 300, 'CAN_COLLIDE']; | ||
_newUnit | _newUnit setRank 'SERGEANT'; | ||
_newUnit = _team | _newUnit = _team createUnit ['rhsusf_usmc_marpat_d_autorifleman', _spawn, [], 300, 'CAN_COLLIDE']; | ||
_newUnit | _newUnit setRank 'CORPORAL'; | ||
_newUnit = _team | _newUnit = _team createUnit ['rhsusf_usmc_marpat_d_rifleman_m4', _spawn, [], 300, 'CAN_COLLIDE']; | ||
_newUnit | _newUnit setRank 'PRIVATE'; | ||
_newUnit = _team | _newUnit = _team createUnit ['rhsusf_usmc_marpat_d_riflemanat', _spawn, [], 300, 'CAN_COLLIDE']; | ||
_newUnit | _newUnit setRank 'PRIVATE'; | ||
// Put fireteam in chopper | |||
{ | { | ||
_x moveInCargo _heli; | _x moveInCargo _heli; | ||
} forEach units _team; | } forEach units _team; | ||
// Make sure all waypoints are deleted | |||
while {(count (waypoints (_team) )) > 0} do | |||
{ | { | ||
deleteWaypoint ((waypoints (_team) ) select 0); | |||
}; | }; | ||
while {(count (waypoints (_heliGroup) )) > 0} do | |||
{ | { | ||
deleteWaypoint ((waypoints (_heliGroup)) select 0); | |||
}; | }; | ||
// Tell them to land and unload | |||
_wp1 = _heliGroup | _wp1 = _heliGroup addWaypoint [_lz, 0]; | ||
_wp1 | _wp1 setWaypointType "TR UNLOAD"; | ||
_wp2 = _team | _wp2 = _team addWaypoint [_lz, 0]; | ||
_wp2 | _wp2 setWaypointType "GETOUT"; | ||
_wp2 | _wp2 synchronizeWaypoint [_wp1]; | ||
_heliGroup | _heliGroup addWaypoint [_exit, 0]; | ||
_team | _team setFormation 'WEDGE'; | ||
_team | _team setCombatMode 'YELLOW'; | ||
_team | _team setBehaviour 'AWARE'; | ||
_team | _team setSpeedMode 'NORMAL'; | ||
[_team, 1] | [_team, 1] setWaypointSpeed "NORMAL"; | ||
}; | }; | ||
[spawn, lz, exit] | |||
</ | [spawn, lz, exit] call spawnTransportQRF; | ||
</sqf> |
Latest revision as of 11:38, 6 April 2024
DrPastah | |
My Sandbox
User:DrPastah/Sandbox |
My Contributions
Special:Contributions/DrPastah |
Helicopter Transport Script
// The Landing needs to be a helipad object. You can use an invisible helipad.
spawnTransportQRF = {
_spawn = _this select 0;
_lz = _this select 1;
_exit = _this select 2;
// Helicopter with pilots
_heliGroup = createGroup WEST;
_heli = createVehicle ['RHS_UH1Y_UNARMED_d', _spawn, [], 300, 'FLY'];
_pilot = _heliGroup createUnit ['rhsusf_usmc_marpat_d_helipilot', _spawn, [], 300, 'CAN_COLLIDE'];
_pilot setRank 'PRIVATE';
_copilot = _heliGroup createUnit ['rhsusf_usmc_marpat_d_helipilot', _spawn, [], 300, 'CAN_COLLIDE'];
_copilot setRank 'PRIVATE';
// Put pilots in chopper
_pilot moveInDriver _heli;
_copilot moveInAny _heli;
_heliGroup setFormation 'WEDGE';
_heliGroup setBehaviour 'SAFE';
_heliGroup setSpeedMode 'NORMAL';
// Fireteam
_team = createGroup WEST;
_newUnit = _team createUnit ['rhsusf_usmc_marpat_d_teamleader', _spawn, [], 300, 'CAN_COLLIDE'];
_newUnit setRank 'SERGEANT';
_newUnit = _team createUnit ['rhsusf_usmc_marpat_d_autorifleman', _spawn, [], 300, 'CAN_COLLIDE'];
_newUnit setRank 'CORPORAL';
_newUnit = _team createUnit ['rhsusf_usmc_marpat_d_rifleman_m4', _spawn, [], 300, 'CAN_COLLIDE'];
_newUnit setRank 'PRIVATE';
_newUnit = _team createUnit ['rhsusf_usmc_marpat_d_riflemanat', _spawn, [], 300, 'CAN_COLLIDE'];
_newUnit setRank 'PRIVATE';
// Put fireteam in chopper
{
_x moveInCargo _heli;
} forEach units _team;
// Make sure all waypoints are deleted
while {(count (waypoints (_team) )) > 0} do
{
deleteWaypoint ((waypoints (_team) ) select 0);
};
while {(count (waypoints (_heliGroup) )) > 0} do
{
deleteWaypoint ((waypoints (_heliGroup)) select 0);
};
// Tell them to land and unload
_wp1 = _heliGroup addWaypoint [_lz, 0];
_wp1 setWaypointType "TR UNLOAD";
_wp2 = _team addWaypoint [_lz, 0];
_wp2 setWaypointType "GETOUT";
_wp2 synchronizeWaypoint [_wp1];
_heliGroup addWaypoint [_exit, 0];
_team setFormation 'WEDGE';
_team setCombatMode 'YELLOW';
_team setBehaviour 'AWARE';
_team setSpeedMode 'NORMAL';
[_team, 1] setWaypointSpeed "NORMAL";
};
[spawn, lz, exit] call spawnTransportQRF;