HALO Jump On Spawn! - Tutorial

This would be great, its currently off my server because i cant have it set to only spawn halo on respawn. Ive used the code above
Code:
if (dayzPlayerLogin2 select 2 && dayzPlayerLogin select 4) then
        {
            _pos = position player;
            "respawn_west" setMarkerPos [_pos select 0, _pos select 1];
            [player, 1000] spawn bis_fnc_halo;
        };

but now it doesnt spawn at all. dayzPlayerLogin select 4 doesnt seem to be finding the respawn.
 
Possibly the script could search if a players have been playing for 00:00:00(Hours:Minutes:Seconds) then
[player, 1000] spawn bis_fnc_halo;
--------------------------------------------
Just a quick guess
 
For New/Death spawning

I would say either run a check to see if _isNew in server_playerLogin or run a check on _worldspace > 0 then continue else run the halo jump (server_PlayerSetup).


Looking into this now.
 
This could possibly replace that code above for New/Fresh Spawns only. Untested. Just a quick look:

server_playerSetup.sqf
FIND THIS -
Code:
if (count _worldspace > 0) then {
 
    _position =    _worldspace select 1;
    if (count _position < 3) then {
        //prevent debug world!
        _randomSpot = true;
    };
    _debug = getMarkerpos "respawn_west";
    _distance = _debug distance _position;
    if (_distance < 2000) then {
        _randomSpot = true;
    };
 
    _distance = [0,0,0] distance _position;
    if (_distance < 500) then {
        _randomSpot = true;
    };
 
    //_playerObj setPosATL _position;
} else {
  //ADD THIS-  New Code for Halo Spawn
    _pos = position player;
    "respawn_west" setMarkerPos [_pos select 0, _pos select 1];
    [player, 1000] spawn bis_fnc_halo;
    //_randomSpot = true;
};
 
I hope this gets figured out, I totally wana couple this with the Blur guide on adding music. I've tested it out, it was awesome together BUT again, the not saving issue... Ehh.
 
I figured it out and added it to my server... Fully working... Might upload a video tut soon if people want to know badly.
 
Without the saving issues? Please do!
For the first few times I logged in and out of my server I did have the save issue but when I just kept reloggin over and over again it eventually worked and started saving correctly so maybe try this? I did do the same exact thing the written text said to do. Although for the anti-hack 1.7.6.1 that x00 leaked for the addactions I added these actions: bis_fnc_halo_action, s_halo_action, bis_fnc_halo, bis_fnc_halo_keydown. I don't know if these would make a difference or not they probably wouldn't... Also another thing is when I installed this I completely deleted my MPMissions file did this script the first thing then added all my other ones.
 
Ok what I found out for my server at least don't know about anyone else but this works for me. After I add halo jump at first it didn't save my character. When I restart my server the save then works then after about 3 maybe 4 hours on the server.exe mine usually gets spammed with green text but it starts to slow down when the save stops working I can't give the green code because I am currently on my iPad I will look into it later when I get back to my computer.
 
Ok what I found out for my server at least don't know about anyone else but this works for me. After I add halo jump at first it didn't save my character. When I restart my server the save then works then after about 3 maybe 4 hours on the server.exe mine usually gets spammed with green text but it starts to slow down when the save stops working I can't give the green code because I am currently on my iPad I will look into it later when I get back to my computer.
Please, oh pleeeeeeeeeeease post on how you got it working, THANK YOU!
 
Sorry to dash hopes, but for anyone thinking logging in and out, and restarting your server repeatedly, is the fix...it's not. That is not how coding works. It is either going to work, or not work. It is not mechanics...things aren't going to run better after you lube them up and get them spinning for a little while.

I repeat, it is either working or not working, not going to fix itself with some logging in and out.

If it does work randomly on one of your server restarts, it is not guaranteed to stay fixed. Just keep that in mind. I really am not trying to be a jerk, I just wanted to clarify this.
 
Follow this and Download the fixes file below. Halo Spawn for New Players, or Respawn only and saving. All original code credits to the OP. Just played with it a bit to fix some things.

Let's Start with the Server:

dayz_server.pbo>>complie>>server_playerSetup.sqf

Find:
Code:
dayzPlayerLogin2 = [_worldspace,_state];

Change to:
Code:
dayzPlayerLogin2 = [_worldspace,_state,_randomSpot];

And now the Mission:

dayz_X.chernarus>>init.sqf
(X represents your instance ID)


At the bottom ADD:
Code:
MC_BIS_halo_spawn = compile preprocessFileLineNumbers "fixes\haloInit.sqf";
private["_mkr"];
_mkr = "spawn" + str(round(random 4));
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
        {
            _pos = position player;
            _mkr setMarkerPos [_pos select 0, _pos select 1];
            player spawn MC_BIS_halo_spawn;
        };
    };
};


Here is where you have 2 options.

Option #1: Use the fn_HALO.sqf that the OP provided and no BE changes need to be made. If you choose this option do this:

dayz_X.chernarus.pbo>>fixes>>haloInit.sqf
(X represents your instance ID)

Change this:

Code:
if (!isDedicated) then {
    [player, 1000] exec "ca\air2\halo\data\Scripts\HALO_init.sqs";
};

To this:

Code:
if (!isDedicated) then {
    [player, 1000] execVM "fixes\fn_HALO.sqf";
};



Option #2: Leave the haloInit.sqf as is and it will work. I chose to do HALO Spawn with the existing files in ARMA 2 OA. I had to change some CreateVehicle filters and few other things but it works Your choice.
If you choose #2 make sure to do the following.

Profile Path
dayz_X.chernarus>>Battleye>>creatvehicle.txt
(X representing your instance ID)

Find:

Code:
5 "Parachute" !="ParachuteWest"//under monitoring


Change T0:
Code:
5 "Parachute" !="ParachuteWest" !"ParachuteEast" !"ParachuteG" !"ParachuteC"//under monitoring

dayz_server.pbo>>compile>>server_updateObject.sqf

Find this:

Code:
if (!_parachuteWest) then {
    if (_objectID == "0" && _uid == "0") then
    {
        _object_position = getPosATL _object;
            diag_log(format["Deleting object %1 with invalid ID at pos [%2,%3,%4]",
            typeOf _object,
            _object_position select 0,
            _object_position select 1,
            _object_position select 2]);
            _isNotOk = true;
    };
};

Change To (Comment Out)

Code:
/*
if (!_parachuteWest) then {
    if (_objectID == "0" && _uid == "0") then
    {
        _object_position = getPosATL _object;
            diag_log(format["Deleting object %1 with invalid ID at pos [%2,%3,%4]",
            typeOf _object,
            _object_position select 0,
            _object_position select 1,
            _object_position select 2]);
            _isNotOk = true;
    };
};
*/

FROM THE OP:

Now we need to fix the anti-teleport issue in 1.7.6.1 so:
Find player_monitor.fsm in your @DayZ folder (C:\Program Files (x86)\Steam\steamapps\common\arma 2 operation arrowhead\@DayZ\Addons\dayz_code\system) --- you must unpack your dayz_code.pbo to see the file ---
Place that file (player_monitor.fsm) in your fixes folder as well.
Edit it, and find:

Code:
 "[] execVM ""\z\addons\dayz_code\system\antihack.sqf"";" \n

Now replace it with:
Code:
// "[] execVM ""\z\addons\dayz_code\system\antihack.sqf"";" \n
Open init.sqf and find:
Code:
_playerMonitor =    [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
Replace it with:
Code:
_playerMonitor =    [] execFSM "fixes\player_monitor.fsm";
Repack and upload! Enjoy!

I think that's it. The reason Saving was not working is "respawn_west" is designated as Debug and thus the server thinks you are still there. I made it so all HALO spawns are based on the 4 (Chernarus) spawns.

I will probably change the Z axis of the spawns so players dont Flash in on the coast and then disappear to the HALO height. Not a huge issue.

Also, if you want to change the height of the "fall":

dayz_X.chernarus.pbo>>fixes>>haloInit.sqf

Change 1000 to whatever height you want.
Code:
if (!isDedicated) then {
    [player, 1000] exec "ca\air2\halo\data\Scripts\HALO_init.sqs";
};

if you use option 2 and dont already have the below changed, do this:
dayz_serber.pbo>>system>>server_cleanup.fsm
COMMENT OUT THE WHOLE BLOCK
Code:
      "Check for hackers" \n
      " {" \n
      "      if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
      "      diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
      "          (vehicle _x) setDamage 1;" \n
      "          _x setDamage 1;" \n
      "    };" \n
      " } forEach allUnits;" \n

Keep in mind this is for Chernarus Only. Modifications to the mission init.sqf will need to be made for other maps per their spawns.


Any issues let me know.

DOWNLOAD FIXES FOLDER!!!!
FIXES.RAR
 
i want to kiss you now. let me try this out.

bug: there is an open chute in the scroll menu at all times now until you disconect and spawn on the ground again. i used the first method btw
 
thing is the option to open chute is still there after landing. some people have 2 options for open chute when they are on they ground and when they are in air both do the same thing. its a minor bug is not a big deal, i'm glad it saves now ^_^
 
Back
Top