Jump to content

altimeter for para spawn epoch 1.0.4


kiel367

Recommended Posts

hey guys, i was looking into a para spawn script for my server and came across this post

http://opendayz.net/threads/halo-spawn-altimeter.12069/

 

Difficulty = 2/10

 

and its outdated so i decided to play about with this code and try and fix it for 1.0.4

 

so here are the steps for how i installed it

 

Create an sqf file and name it altimeter.sqf

 

pasted in this code (its the nicer of the 2 options the other thread used)

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;
        };
    };
};

then save it

 

next was to open up the init file and paste this just under where it says dayz_paraSpawn = false; (change this to true obviously)

 

paste this code in

[] execVM "folder\altimeter.sqf"; (folder being the custom folder you plan to store it in)

so now it will look like this

 

dayz_paraSpawn = true;
[] execVM "custom\altimeter.sqf";

 

then when a new spawn gets in, they will parachute out the sky, with an altimeter to tell them when to deploy their chute, this then goes away about 20 seconds after they land

 

im in no way a scripter, and just happened to be playing around to see about using the coding in that thread, so all credit goes really to

Wiked Bubble

Link to comment
Share on other sites

  • 2 months later...

I found the file haloInit.sqf at another website, but the script is not working with that file... Do I need to do all the other stuff at the link you are referring too, and do you have a copy of the haloInit.sqf file?

Link to comment
Share on other sites

Im not sure how this would work considering the halo spawns are built into epoch and I certainly dont think anyone has a fixes\haloinit.sqf.... this altimeter was designed for vanilla dayz to work with the halo spawn addon. Since epoch has it built in, Im not sure how you would get this to work.

Link to comment
Share on other sites

override the halo_jump.sqf in fn_selfActions.sqf

if(DZE_HaloJump) then {
	if(_inVehicle and (_vehicle isKindOf "Air") and ((getPos _vehicle select 2) > 200)) then {
		if (s_halo_action < 0) then {
			DZE_myHaloVehicle = _vehicle;
			s_halo_action = DZE_myHaloVehicle addAction [localize "STR_EPOCH_ACTIONS_HALO","dayz_code\actions\halo_jump.sqf",[],2,false,true,"",""];
		};
	} else {
		DZE_myHaloVehicle removeAction s_halo_action;
		s_halo_action = -1;
	};
};

Create a file and call it  halo_jump.sqf and paste everything below in that file.

I put it in my dayz_code folder "dayz_code\actions\halo_jump.sqf" 

DZE_myHaloVehicle removeAction s_halo_action;
s_halo_action = -1;

player action [ "eject", (vehicle player)];
sleep 1;
player spawn BIS_fnc_halo;
[] execVM "custom\altimeter.sqf";
player setvelocity [0,120*0.8,0];
player setdir 0;

Create a file and call it altimeter.sqf and paste everything below in that file.

And place this file were you like.

I've put it in my custom folder "custom\altimeter.sqf"

sleep 2;
_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 + "\ntext you like or just delete this"), "PLAIN DOWN", 0.1];
 
};
//debug Stop
diag_log(format["ALTIMETER STOPPED: %1m ", _myalt]);

Thats it ;)  

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

override the halo_jump.sqf in fn_selfActions.sqf

if(DZE_HaloJump) then {
	if(_inVehicle and (_vehicle isKindOf "Air") and ((getPos _vehicle select 2) > 200)) then {
		if (s_halo_action < 0) then {
			DZE_myHaloVehicle = _vehicle;
			s_halo_action = DZE_myHaloVehicle addAction [localize "STR_EPOCH_ACTIONS_HALO","dayz_code\actions\halo_jump.sqf",[],2,false,true,"",""];
		};
	} else {
		DZE_myHaloVehicle removeAction s_halo_action;
		s_halo_action = -1;
	};
};

Create a file and call it  halo_jump.sqf and paste everything below in that file.

I put it in my dayz_code folder "dayz_code\actions\halo_jump.sqf" 

DZE_myHaloVehicle removeAction s_halo_action;
s_halo_action = -1;

player action [ "eject", (vehicle player)];
sleep 1;
player spawn BIS_fnc_halo;
[] execVM "custom\altimeter.sqf";
player setvelocity [0,120*0.8,0];
player setdir 0;

Create a file and call it altimeter.sqf and paste everything below in that file.

And place this file were you like.

I've put it in my custom folder "custom\altimeter.sqf"

sleep 2;
_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 + "\ntext you like or just delete this"), "PLAIN DOWN", 0.1];
 
};
//debug Stop
diag_log(format["ALTIMETER STOPPED: %1m ", _myalt]);

Thats it ;)  

Can anyone confirm if this works on the latest version of epoch? I tried using it but I couldn't seem to get it working. Thanks!

Link to comment
Share on other sites

  • 5 weeks later...
  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...