Edit Hourglass Timmer (passed out)

QueZ

Well-Known Member
Sometimes that Hourglass goes by fast BUT sometimes it takes litterally over 15 minutes to get out of the passed out phase (hourglass). Really annoying and I have a feeling that it's possible to edit the Hourglass Timmer so that it always lasts the same amount of time or simply to control the timmer to whatever best suits your needs.

Is there a way guys?

I'll start looking but I'd really appreciate any direction where to look or advice or if you know it, please share :D

Thanks a bunch guys

-------------------------------------------------------------------------------------

EDIT found the file (I think) that is made for editing the unconscious hourglass. Found in dayz code pbo - fn_unconscious.sqf

What can we edit in here that will make that hourglass always be the same amount of time?
Code:
disableSerialization;
if ((!r_player_handler1) and (r_handlerCount == 0)) then {
    //Unconscious Meter
    _totalTimeout = r_player_timeout;
    4 cutRsc ["playerStatusWaiting", "PLAIN",0];
    _display = uiNamespace getVariable 'DAYZ_GUI_waiting';
    _ctrl1 =    _display displayCtrl 1400;
    _ctrl1Pos = ctrlPosition _ctrl1;
   
    _timeout = 0;
    r_handlerCount = r_handlerCount + 1;
    r_player_handler1 = true;
    player playAction "CanNotMove";
    "dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [2]; "dynamicBlur" ppEffectCommit 0;
    "colorCorrections" ppEffectEnable true;"colorCorrections" ppEffectEnable true;"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 0.1],  [1, 1, 1, 0.0]];"colorCorrections" ppEffectCommit 0;
    0 fadeSound 0.05;
    disableUserInput true;
    //waitUntil{USEC_MotherInbox == ""};
    //["MED001",0,"Unconscious"] call fnc_usec_recordEventClient;
    diag_log "CLIENT: Unconscious...";
    while {(r_player_unconscious)} do {
        _ctrl1 ctrlSetPosition [(_ctrl1Pos select 0),(_ctrl1Pos select 1),(_ctrl1Pos select 2),((0.136829 * safezoneH) * (1 -(r_player_timeout / _totalTimeout)))];
        _ctrl1 ctrlCommit 1;
        playSound "heartbeat_1";
        sleep 1;
        _isOnDeck = false; //getPos player in LHA_Deck;
        _isInLocation = false; //getPos player in LHA_Location;
        _inVehicle = (vehicle _unit != _unit);
        _bloodLow = ((r_player_blood/r_player_bloodTotal) < 0.5);
        if ((surfaceIsWater (getPosASL player)) and !_isOnDeck and !_inVehicle) then {
            player setpos [(getPosASL player select 0),(getPosASL player select 1),0.3];
        };
       
        if(_timeout == 0) then {
            if (!r_player_dead and !_bloodLow and r_player_injured) then {
                _timeout = 10;
                //_animType = (USEC_WoundAnim select (floor(random (count USEC_WoundAnim))));
                //player playActionNow _anim;
            };
        } else {
            _timeout = _timeout - 1;
        };
       
        if (r_player_timeout > 0) then {
            r_player_timeout = r_player_timeout - 1;
        } else {
            if ((!r_player_dead) and (!r_player_cardiac)) then {
                nul = [] spawn fnc_usec_recoverUncons;
            };
        };
        //Check if near field hospital
        _isHospital = false; //(count( nearestObjects [player, ["USMC_WarfareBFieldhHospital"], 8]) > 0);
        if (_isHospital or _isOnDeck or _isInLocation) then {
       
            waitUntil {!(player getVariable ["NORRN_unit_dragged", false])};
       
            cutText[localize "str_medical_healing", "PLAIN", 2];
            sleep 5;
       
            r_player_inpain = false;
            r_player_dead = false;
            r_player_injured = false;
            r_player_cardiac = false;
           
            //Give Blood
            r_player_blood = r_player_bloodTotal;
            player setVariable["USEC_lowBlood",false,true];
            usecMorphine = [player,player];
            publicVariable "usecMorphine";
            player setVariable ["USEC_inPain", false, true];
            usecBandage = [player,player];
            publicVariable "usecBandage";
            player setdamage 0;
            {player setVariable[_x,false,true];} forEach USEC_woundHit;
            player setVariable ["USEC_injured",false,true];
           
            sleep 1;
            r_player_handler = false;
            nul = [] spawn fnc_usec_recoverUncons;
        };
        if (!(player getVariable ["NORRN_unconscious", true])) then {
            nul = [] spawn fnc_usec_recoverUncons;
        };
        if(animationState player == "AmovPpneMstpSnonWnonDnon_healed") then {
            nul = [] spawn fnc_usec_recoverUncons;
        };
    };
    4 cutRsc ["default", "PLAIN",1];
    diag_log "CLIENT: Conscious...";
    disableUserInput false;
    //waitUntil{USEC_MotherInbox == ""};
    //["MED001",0,"Conscious"] call fnc_usec_recordEventClient;
    if (!r_player_injured and ((r_player_blood/r_player_bloodTotal) >= 0.5)) then {
        10 fadeSound 1;
        "dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
        "colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1],  [1, 1, 1, 1]];"colorCorrections" ppEffectCommit 5;
    };
    r_handlerCount = r_handlerCount - 1;
};
 
Lol extremly late but ur in the wrong spot, itll be in medical/setup_functions_med.sqf where in fn_usec_damageUnconscous = {
private["_unit","_damage"];
_unit = _this select 0;
_damage = _this select 1;
_inVehicle = (vehicle _unit != _unit);
if (_unit == player) then {
r_player_timeout = round((((random 2) max 0.1) * _damage) * 20);
r_player_unconscious = true;
player setVariable["medForceUpdate",true,true];
player setVariable ["unconsciousTime", r_player_timeout, true];
};.
r_player_timeout is what you are looking for change it to r_player_timeout = 50; instead of round((((random 2) max 0.1) * _damage) * 20);, and this would make it so you are always unconscious for 50 seconds if you fall unconscious. (You can change the value to whatever you want.)
 
Back
Top