HALO Jumps for dayz

well, i got it to work somehow, although there are some glitches with it.
some players got killed while ejecting or they cant open the chute because theyre just falling down in standing posture, weird! i already use notepad++

i will try your way of calling the halo script
 
I believe you need to set enabledamage false on the player prior to changing the position and then change back to true before they hit the ground/openchute.
 
well it works, but it has some weird effects ... sit in the back seat > halo jump > die
sit in the gunner, pilot seat > halo jump > all fine
 
Because the steerable parchute is equal to a plane, only non steerable "parachutewest" class chutes wont get killed.
 
In order for some vehicles to work in dayz, you must use setvariable and dayz_serverobjectmonitor

setvariable is needed because server_updateObjects will delete any vehicle without a string value in ObjectUID field or ObjectID field.

Example:
Code:
_parachute setVariable ["ObjectUID", "this is a parachute", true];

or

Code:
_parachute setVariable ["ObjectID", "this is a parachute", true];

second, dayz_serverobjectmonitor is an array of vehicles spawned in server_monitor.sqf. This means that your parachute will NOT be in the array 99.99% of the time and thus the player and parachute will get killed by the server.

To address this, one method is to use publicVariable so that the parachute does get added to the array:

on the client:
Code:
dayzParachute = _parachute;
publicVariable "dayzParachute";

on the server:
Code:
"dayzParachute" addPublicVariableEventHandler { dayz_serverObjectMonitor set [count dayz_serverObjectMonitor, (_this select 1)] };
 
If you set either of those variables to a string on an object and then add it to the object monitor, they will get deleted when you look at them if they are a vehicle.

Code:
_object =    _this select 0;
_type =    _this select 1;
_parachuteWest = typeOf _object == "ParachuteWest";
_isNotOk = false;
 
_objectID =    _object getVariable ["ObjectID","0"];
_uid =        _object getVariable ["ObjectUID","0"];
 
if ((typeName _objectID != "string") || (typeName _uid != "string")) then
{
    diag_log(format["Non-string Object: ID %1 UID %2", _objectID, _uid]);
    //force fail
    _objectID = "0";
    _uid = "0";
};
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;
    };
};
 
if (_isNotOk) exitWith { deleteVehicle _object; };

You have to patch server_updateObject.sqf to include the chute from the halo jump, line 8.

This is the halo code from Arma BIS_Steerable_Parachute is what your getting, your not getting a normal chute because you cant steer those.

Code:
;// GIVE STEERABLE PARACHUTE ==========================================================================================================
_vehicle = createVehicle ["BIS_Steerable_Parachute", position _para_unit,[],0,"FLY"]
@ (!isNil "_vehicle")

Change line 8 of server_updateObject.sqf to the following:
Code:
_parachuteWest = (typeOf _object == "ParachuteWest") or (typeOf _object == "BIS_Steerable_Parachute");

They look the same but are not the same class of vehicle.



Also if you want to be able to use these



The line should then read this:

Code:
_parachuteWest = (typeOf _object == "ParachuteBase") or (typeOf _object == "BIS_Steerable_Parachute");
 
Nah dude lol:

read the if check:

Code:
if ((typeName _objectID != "string") || (typeName _uid != "string")) then
{
    diag_log(format["Non-string Object: ID %1 UID %2", _objectID, _uid]);
    //force fail
    _objectID = "0";
    _uid = "0";
};

The check says IF the type is not of string, then force delete. So if we do setvariable objectID to type string, then obviously type string != type string would return false (aka, not delete)

Obviously if you really really wanted you can remove the check entirely
 
In other words:

If you just use ParachuteWest, then you won't have to deal with any hassles.

If you use anything else, then you run into the risk that 1) your chute will disappear and/or 2) The player attach to the chute will die. To address these 2 issues refer to my posts in this thread.
 
In other words:

If you just use ParachuteWest, then you won't have to deal with any hassles.

If you use anything else, then you run into the risk that 1) your chute will disappear and/or 2) The player attach to the chute will die. To address these 2 issues refer to my posts in this thread.

Would it be possible for either of you to post a quick guide compiled into 1 post? Because honestly I didn't understand the back and forth between you and Xyber nor the issues you addressed. If you're busy, I fully understand. Thanks anyways =)
 
dayz_server.pbo:

- server_updateObjects.sqf :
change:
_parachuteWest = typeOf _object == "ParachuteWest";

into:
_parachuteWest = (typeOf _object == "ParachuteBase") or (typeOf _object == "BIS_Steerable_Parachute");

and I deleted this whole part:
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;
};
};

- server_cleanup.fsm:
delete whole part:
"//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
"" \n

i guess you can also change ParachuteWest into ParachuteBase instead of deleting the whole part there
 
halo jumps
but somehow they still have bugs as i mentioned earlier

if you sit in the pilot or one of the gunner seats youre fine to halo jump without problems
if you sit anywhere else theres the possibility that you have a problem when executing the halojump ... you exit without the parachute and fall down to the ground without the option 'open shute' and *SPLAT*
 
that would be greatly apprechiated :)

this is what the actual script looks like:
jump.sqf

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


this is my call for the action
fn_selfActions.sqf

Code:
if ( (cursorTarget isKindOf "Air") and (getDammage cursorTarget < 0.95) ) 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>"),"halo\halo.sqf",[],2,false,true,"","(_this in _target) && (getPosATL player select 2) > 10"];
  };
};
 
Back
Top