HALO Jumps for dayz

Add this file to your mission.pbo under the folder fixes\ (if you don't have the folder make it)

fn_halo.sqf (see attachment)

Then in init.sqf from mission.pbo add this line:
Code:
bis_fnc_halo = compile preprocessFileLineNumbers "fixes\fn_HALO.sqf";

For example:
Code:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions
progressLoadingScreen 1.0;
 
bis_fnc_halo = compile preprocessFileLineNumbers "fixes\fn_HALO.sqf";

You will see need fn_selfActions.sqf and jump.sqf to take advantage of fn_halo.sqf but you won't have to modify them in anyway.
 

Attachments

  • fn_halo.sqf
    12.2 KB · Views: 79
so the calls for halo\jump.sqf remain all the same ... only add the compile line to the init.sqf and add the folder to the missionfile? ok will test it! 9mins to server restart :3
 
well i dont have a test server yet :/
tried setting one up locally but couldnt connect o_O

result may take a time, we are right know testing which weapon stays from all weaponsboxes after reconnect, btw any one knows how to disable the server cleanup for that ? ^^
 
ok we have tested it now with Mi17_DZ and MV22

after your changes had been implemented we still had issues with halo jumping from the backseat
but this little thing made it work properly

player action [ "eject", vehicle player];
sleep 1;
player removeWeapon "ParachuteWest";
sleep 0.1;
player spawn bis_fnc_halo;
player setvelocity [0,120*0.8,0];
player setdir 0;

i figured that the script executed too fast for the server to keep up, so i just tried this sleep command
and whatyaknow it fcking works !

only in the Mi17 you have issues because of the tailboom ... you hit it when you eject, you have a aggressive forward pitch it works :)
 
Please could someone post a tutorial here or make a new thread, the conversation you guys have had is abit confusing and i really want this Halo Jump! Looks cool
 
ok we have tested it now with Mi17_DZ and MV22

after your changes had been implemented we still had issues with halo jumping from the backseat
but this little thing made it work properly

player action [ "eject", vehicle player];
sleep 1;
player removeWeapon "ParachuteWest";
sleep 0.1;
player spawn bis_fnc_halo;
player setvelocity [0,120*0.8,0];
player setdir 0;

i figured that the script executed too fast for the server to keep up, so i just tried this sleep command
and whatyaknow it fcking works !

only in the Mi17 you have issues because of the tailboom ... you hit it when you eject, you have a aggressive forward pitch it works :)

Actually, considering how bis_fnc_halo works, you should first spawn the function, then make the player eject:
player spawn bis_fnc_halo;

player action [ "eject", vehicle player];

Now you shouldn't need sleep anymore
 
i will try that

but it works now, havent had any deaths of my test subjects due to lack of parachute on their back ... only due to lack of intelligence to open chute before too low :D
 
K here is the complete package:

files:
fn_halo.sqf
haloInit.sqf

Both of these files go into fixes folder in your mission.pbo (make the folder if one does not exist)

Then in your init.sqf from mission.pbo, add the following code at the end:

Code:
bis_fnc_halo = compile preprocessFileLineNumbers "fixes\fn_HALO.sqf";
 
if (!isDedicated) then {
    [] spawn {
        while {true} do
        {
            if ( (cursorTarget isKindOf "Air") and (getDammage cursorTarget < 0.95) and (!isNull player) ) then {
              _vehicle = cursorTarget;
              _HALO_CARGO_ActionAdded = _vehicle getVariable["HALO_CARGO_ActionAdded",false];
         
              if( !_HALO_CARGO_ActionAdded ) then {
                _vehicle setVariable ["HALO_CARGO_ActionAdded", true];
                // HALO Jump
                s_halo_action = _vehicle addAction [("<t color=""#FF9800"">" + ("HALO Jump") + "</t>"),"fixes\haloInit.sqf",[],2,false,true,"","(getPosATL player select 2) > 10"];
              };
            };
            sleep 1;
        };
    };
};

Done.

I've also included an example mission pbo (Reality-compatible)

ALSO you may have to add this exception to scripts.txt (after 5 createVehicle)

!"_para = \"ParachuteWest\" createVehicle position _unit"
 

Attachments

  • fn_halo.sqf
    12.2 KB · Views: 154
  • haloInit.sqf
    73 bytes · Views: 147
  • dayz_1.chernarus.pbo
    53.3 KB · Views: 96
To enable new spawns to HALO in:

Install the HALO complete package in my previous post, then add these lines of code to the end of init.sqf from mission.pbo:

Code:
if (!isDedicated) then {
    [] spawn {
        waitUntil { !isNil ("dayz_Totalzedscheck") and  !(player getVariable ["humanity",0] > 5000 and typeOf player == "Survivor2_DZ") and !(player getVariable ["humanity",0] < -2000 and (typeOf player == "Survivor2_DZ" or typeOf player == "SurvivorW2_DZ") ) and !(player getVariable ["humanity",0] > 0 and (typeOf player == "Bandit1_DZ" or typeOf player == "BanditW1_DZ") ) };
   
        if (dayzPlayerLogin2 select 2) then
        {
            [player, 1000] spawn bis_fnc_halo;
        };
    };
};

Then, in your server.pbo, server_playerSetup.sqf, change this line:
Code:
dayzPlayerLogin2 = [_worldspace,_state];
to
Code:
dayzPlayerLogin2 = [_worldspace,_state, _randomSpot];


Now all new spawns will HALO in at 1km (careful when it's nighttime)
 
Life saver, gonna try this now... I been ripping hair out at all the things i've tried and totally messed up... BRB!

edit: Works flawlessly. You're the greatest.

edit 2: I hate you. I can't stop killing myself, this is fun.
 
Halo spawns work fine with one person in the server (or the first person to join) but it seems when there is more then one person in the server, it either doesn't spawn them in the air or spawns them in the animation or on the ground.
 
Try adding this instead (I've also edited my previous post to reflect this new information):

Code:
if (!isDedicated) then {
    [] spawn {
        waitUntil {count (dayzPlayerLogin2) > 0 and !isNil ("dayzLoginRecord") and !(player getVariable ["humanity",0] > 5000 and typeOf player == "Survivor2_DZ") and !(player getVariable ["humanity",0] < -2000 and (typeOf player == "Survivor2_DZ" or typeOf player == "SurvivorW2_DZ") ) };
       
        if (dayzPlayerLogin2 select 2) then
        {
            [player, 1000] spawn bis_fnc_halo;
        };
    };
};
 
Back
Top