Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- span class="re5"> params["_player", "_position"];
- private _jumpDelay = 3; // Seconds
- deleteMarkerLocal "halo_marker";
- if (_position isEqualTo [0,0,0]) exitWith {
- systemChat "No Jump coords marked...";
- };
- ["HaloJumping", [format["Halo Jumping! Please wait %1 seconds...", _jumpDelay]]] call BIS_fnc_showNotification;
- sleep _jumpDelay;
- private _squadBool = uiNamespace getVariable["TRA_haloSquadBool", false];
- private _vehicleBool = uiNamespace getVariable["TRA_haloVehicleBool", false];
- private _vehicle = uiNamespace getVariable["TRA_haloVehicle", objNull];
- systemChat str (typeOf _vehicle);
- private _players = [];
- // Bring the halo jump initiator as well
- _players pushBack _player;
- // Infantry Check
- if (_squadBool isEqualTo 1) then {
- _squad = (units (group _player)) select {
- (_player distance2D _x) <= 15
- };
- systemChat (str _squad);
- {
- // Current result is saved in variable _x
- _players pushBack _x;
- } forEach (_squad);
- };
- // Vehicle Check
- if (_vehicleBool isEqualTo 1) exitWith {
- systemChat "_vehicleBool was 1";
- // _veh = _vehicle;
- if (_vehicle isEqualTo objNull || _vehicle isEqualTo "") exitWith {
- systemChat "No Vehicle Selected...";
- };
- playSound ['FlyBy', false, 0];
- _vehicle setPosATL _position;
- _vehicle addBackpackCargoGlobal ["B_Parachute", count (crew _vehicle select {isPlayer _x})];
- _chute = createVehicle ["B_Parachute_02_F", [0, 0, 1000], [], 0, "NONE"];
- _chute allowDamage false;
- _chute enableSimulation false;
- // Make chute wait until certain altitude to deploy (not very smooth, insta stops vehicle mid air)
- [_vehicle, _chute] spawn {
- params["_veh", "_chute"];
- while {((getPosATL _veh) select 2) >= 350} do {
- sleep 1;
- };
- _vehPos = getPosATL _veh;
- _chute setPosATL _vehPos;
- _chute allowDamage true;
- _chute enableSimulation true;
- _veh attachTo [_chute, [0, 0, 2]];
- };
- {
- // Current result is saved in variable _x
- _space = random 15;
- _x setPosATL [(_position select 0) + _space, (_position select 1) + _space, _position select 2];
- _x setVariable ['TRA_lastHalo', diag_tickTime];
- if ((backpack _x) isNotEqualTo "") then {
- [_x] call bocr_main_fnc_actionOnChest;
- };
- _x addBackpack "B_Parachute";
- } forEach _players;
- };
- systemChat "Vehicle Bool Was:";
- systemChat str _vehicleBool;
- playSound ['FlyBy', false, 0];
- {
- // Current result is saved in variable _x
- _space = random 15;
- _x setPosATL [(_position select 0) + _space, (_position select 1) + _space, _position select 2];
- _x setVariable ['TRA_lastHalo', diag_tickTime];
- if ((backpack _x) isNotEqualTo "") then {
- [_x] call bocr_main_fnc_actionOnChest;
- };
- _x addBackpack "B_Parachute";
- } forEach _players;
- _player setVariable ['TRA_lastHalo', diag_tickTime];
- [_player] call bocr_main_fnc_actionOnChest;
- _player addBackpack "B_Parachute";
- _player setPosATL _position;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement