HALO Jump On Spawn! - Tutorial

try using a check to see if the player is a newspawn or not.. if they are not then execute the logincamera.
this is the code... credits to player2

change logincamera_execute.sqf to:

Code:
sleep 5;
waitUntil {!dialog};
camera = compile preprocessFileLineNumbers "camera\logincamera.sqf";
waitUntil {!isNil ("dayzLoginRecord")};
 
if !(dayzPlayerLogin2 select 2) then
{
    player spawn camera;
};
execVM "camera\playerspawn.sqf";
in your init.sqf make sure you have it like this

Code:
//Run the player monitor
    _id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "logincamera_execute.sqf";}];
    _playerMonitor =    [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
    _nul = [] execVM "logincamera_execute.sqf";
not sure if this will work as i didnt test it... let me know how you go! if it doesnt work ill grap your mission.pbo off you and install and test myself for you
 

Quagmire

New Member
Peter Brennan You Sir are a dead set Legend, thank you very much, all I needed was this
Code:
camera = compile preprocessFileLineNumbers "camera\loginCamera_execute.sqf";
waitUntil {!isNil ("dayz_Totalzedscheck")};
 
if !(dayzPlayerLogin2 select 2) then
{
    player spawn camera;
};
I did change a few things
Code:
//Run the player monitor
    _id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "logincamera_execute.sqf";}];
    _playerMonitor =    [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
    _nul = [] execVM "logincamera_execute.sqf";
this part was not necessary, well it works without it, I also changed dayzLoginRecord for dayz_Totalzedscheck in an attempt to call in a bit earlier, also removed sleep 5; waitUntil {!dialog}; to speed things up, almost perfect now, if I get it any better I will post it up, once again Peter thank u very much
 

Quagmire

New Member
turns out all I needed was
Code:
if !(dayzPlayerLogin2 select 2) then
{
    [] execVM "camera\loginCamera_execute.sqf";
};
works great halo spawn now works properly and so does the login camera, thank's Peter Brennan your a champion
 

veX

Member
ok so Epoch 1.0.2.4 has Halo Jump now added. However its enabled for every login. Anyone already tried to alter it to limit it to fresh spawns & dead/killed players? If so could you share how you did it?

[ADDED] dayz_paraSpawn = true now uses 1000m halo jumps for each login and fresh spawns.
 
I'm on holidays atm. I'll be back in 6 days and then I'll be updating my server to 1.0.2.4
I'll let you know when I get to halo spawn to edit it
 

Quagmire

New Member
ok so Epoch 1.0.2.4 has Halo Jump now added. However its enabled for every login. Anyone already tried to alter it to limit it to fresh spawns & dead/killed players? If so could you share how you did it?
try this code if u have done everything on page 1 except the player_monitor.fsm u don't have to do that step on epoch
Code:
if (!isDedicated) then {
    [] spawn {
        waitUntil { !isNil ("dayz_Totalzedscheck") and  !(player getVariable ["humanity",0] > 50000 and typeOf player == "Survivor2_DZ") and !(player getVariable ["humanity",0] < -50000 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 && dayzPlayerLogin select 4) then
        {
            _pos = position player;
            "respawn_west" setMarkerPos [_pos select 0, _pos select 1];
            [player, 2000] spawn bis_fnc_halo;
            _nul = [] execVM "custom\altimeter.sqf";
        };
    };
};
the only things I changed was the humanity to 50000 because in epoch I don't think humanity is capped and add this line
Code:
if (dayzPlayerLogin2 select 2 && dayzPlayerLogin select 4) then
to make it work for new spawns and after death only, good luck let me know how u go, works great for me, u can remove this line
Code:
_nul = [] execVM "custom\altimeter.sqf";
if u don't use a altimeter, I would remove this line
Code:
dayz_paraSpawn = true
as that might mess things up, I don't have that line in my init.sqf I would check your humanity
 

veX

Member
thx guess I try it on my testmirror first, but since they added halo jump in 1.0.2.4 themselves I was thinking that there must be a simpler way to just limit it to freshspawns and killed player. You know instead off adding it myself in the mission and whatnot, since the code is already be in there, I guess.
 

veX

Member
OK, so I finally got around to take a look at HALO spawns in epoch. Making it work for new spawns only is pretty straight forward, we only need to overwrite the player_monitor:

1. get the player_monitor.fsm out of your dayz_code.pbo and copy it into a custom folder in your mission folder/pbo
2. the code to edit is this one (here you can also edit the height "1000"):
Code:
      "if(dayz_paraSpawn and !(player isKindOf ""PZombie_VB"")) then {" \n
      "    player setPosATL [(_setPos select 0),(_setPos select 1),1000];" \n
      "    player setDir _setDir;" \n
      "    [player, 1000] exec ""ca\air2\halo\data\Scripts\HALO_init.sqs"";" \n
      "} else {" \n
For new spawns and after death:
Code:
      "if(dayz_paraSpawn and !(player isKindOf ""PZombie_VB"") and _isNew) then {" \n
      "    player setPosATL [(_setPos select 0),(_setPos select 1),1000];" \n
      "    player setDir _setDir;" \n
      "    [player, 1000] exec ""ca\air2\halo\data\Scripts\HALO_init.sqs"";" \n
      "} else {" \n
3. calling it from the mission init.sqf:
find
Code:
_playerMonitor =     [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
change to
Code:
_playerMonitor =     [] execFSM "yourcustomfolder\player_monitor.fsm";
if your mission.pbo is packed then repack and your done. a good height seems to be 2000, so that older PCs can keep up and your players don't die.
 

Quagmire

New Member
where is this "altimeter.sqf"?
cant remember where i got mine from but if u want the debug version, google it u will find it easy, heres my version with the meter on the screen, just make a .sqf file and call it altimeter then put this in it
Code:
sleep 5;
_myalt = getPos player select 2;
_myalt = round(_myalt);
//debug start
diag_log(format["ALTIMETER STARTED: %1m ", _myalt]);
 
while {(_myalt) > 0} do {
 
// Display my altitude text.
_myalt = getPos player select 2;
_myalt = round(_myalt);
 
titleText [("                                      ALTITUDE: " + str _myalt + "\n\n                                      Scroll ""mouse"" select Open Chute"), "PLAIN DOWN", 0.1];
 
};
//debug Stop
diag_log(format["ALTIMETER STOPPED: %1m ", _myalt]);
 

Quagmire

New Member
OK, so I finally got around to take a look at HALO spawns in epoch. Making it work for new spawns only is pretty straight forward, we only need to overwrite the player_monitor:

1. get the player_monitor.fsm out of your dayz_code.pbo and copy it into a custom folder in your mission folder/pbo
2. the code to edit is this one (here you can also edit the height "1000"):
Code:
      "if(dayz_paraSpawn and !(player isKindOf ""PZombie_VB"")) then {" \n
      "    player setPosATL [(_setPos select 0),(_setPos select 1),1000];" \n
      "    player setDir _setDir;" \n
      "    [player, 1000] exec ""ca\air2\halo\data\Scripts\HALO_init.sqs"";" \n
      "} else {" \n
For new spawns and after death:
Code:
      "if(dayz_paraSpawn and !(player isKindOf ""PZombie_VB"") and _isNew) then {" \n
      "    player setPosATL [(_setPos select 0),(_setPos select 1),1000];" \n
      "    player setDir _setDir;" \n
      "    [player, 1000] exec ""ca\air2\halo\data\Scripts\HALO_init.sqs"";" \n
      "} else {" \n
3. calling it from the mission init.sqf:
find
Code:
_playerMonitor =    [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
change to
Code:
_playerMonitor =    [] execFSM "yourcustomfolder\player_monitor.fsm";
if your mission.pbo is packed then repack and your done. a good height seems to be 2000, so that older PCs can keep up and your players don't die.
thanks veX that works great, i also added altimeter by adding
Code:
      "if(dayz_paraSpawn and !(player isKindOf ""PZombie_VB"") and _isNew) then {" \n
      "    player setPosATL [(_setPos select 0),(_setPos select 1),2000];" \n
      "    player setDir _setDir;" \n
      "    [player, 2000] exec ""ca\air2\halo\data\Scripts\HALO_init.sqs"";" \n
      "    _nul = [] execVM ""custom\altimeter.sqf"";" \n
      "} else {" \n
once again thanks veX :)
 

EpiX

Member
Could someone please help me set this up on overwatch?
I currently have it working and saving on Overwatch 0.2.5 using the OP's setup and this in my init.sqf
Code:
bis_fnc_halo = compile preprocessFileLineNumbers "fixes\fn_HALO.sqf";
waitUntil {!isNil ("PVDZ_plr_LoginRecord")};
if (PVCDZ_plr_Login2 select 2) then
{
    _pos = position player;
    "center" setMarkerPos [_pos select 0, _pos select 1];
    [player, 1700] spawn bis_fnc_halo;
    _nul = [] execVM "playerspawn.sqf";
    _nul = [] execVM "compile\Server_WelcomeCredits.sqf";
    _nul = [] execVM "scripts\altimeter.sqf"
};
This is setup to only play the introSong.ogg and the Credits if the player is a newspawn.

One issue with this though is when the players die, or log out their character stays there standing up. Others can loot off of the bodies if they log out and Im not sure whats going on with it. Anyone have any advice or a fix for this?
 
Last edited:

Chris Atkins

Valued Member!
Weird thing is, the chute fails a few seconds after deploying...it just disappears and players fall to their death. I've spent the day trying to figure out why, with no luck. Antone else whose had this issue could you please inform me of the resoultion? Thanks.

Note*
This is on Overwatch 0.2.5
 

carfy666

New Member
thanks veX that works great, i also added altimeter by adding
Code:
      "if(dayz_paraSpawn and !(player isKindOf ""PZombie_VB"") and _isNew) then {" \n
      "    player setPosATL [(_setPos select 0),(_setPos select 1),2000];" \n
      "    player setDir _setDir;" \n
      "    [player, 2000] exec ""ca\air2\halo\data\Scripts\HALO_init.sqs"";" \n
      "    _nul = [] execVM ""custom\altimeter.sqf"";" \n
      "} else {" \n
once again thanks veX :)
Hi,
I really need your help, im running the login camera and also want to set up the halo spawn for new spawns exactly like you but for the life of me I cant get them to work.
Could I see your:
init.sqf
playermonitor.fsm
and any steps you took to get them to co exist please im really interested to learn.

Also did you just follow the steps from page 1 for halo?
Thanks,
Andy
 
Top