Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Would it be possible to have the bandage action linked to the scroll menu?
eg. ifBleeding then {scrollmenu="Bandage Self"}
Just a thought!
if ((player getVariable["USEC_injured",true]) && ("ItemBandage" in _mags) )then {
isBleedingCheck = true;
} else { isBleedingCheck = false;};
if((speed player <= 1) && isBleedingCheck && _canDo) then {
if (s_player_scrollBandage < 0) then {
s_player_scrollBandage = player addaction[("<t color=""#c70000"">" + ("Bandage") +"</t>"),"fixes\player_scrollBandage.sqf","",6,false,true,"", ""];
};
} else {
player removeAction s_player_scrollBandage;
s_player_scrollBandage = -1;
};
Something like this?
Updated it to this:
Code:if ((player getVariable["USEC_injured",true]) && ("ItemBandage" in _mags) )then { isBleedingCheck = true; } else { isBleedingCheck = false;}; if((speed player <= 1) && isBleedingCheck && _canDo) then { if (s_player_scrollBandage < 0) then { s_player_scrollBandage = player addaction[("<t color=""#c70000"">" + ("Bandage") +"</t>"),"fixes\player_scrollBandage.sqf","",6,false,true,"", ""]; }; } else { player removeAction s_player_scrollBandage; s_player_scrollBandage = -1; };
player removeMagazine "ItemBandage";
call fnc_usec_medic_removeActions;
r_action = false;
if (vehicle player == player) then {
player playActionNow "Medic";
};
r_interrupt = false;
_animState = animationState player;
r_doLoop = true;
_started = false;
_finished = false;
[player,"bandage",0,false] call dayz_zombieSpeak;
while {r_doLoop} do {
_animState = animationState player;
_isMedic = ["medic",_animState] call fnc_inString;
if (_isMedic) then {
_started = true;
};
if (_started and !_isMedic) then {
r_doLoop = false;
_finished = true;
};
if (r_interrupt) then {
r_doLoop = false;
};
sleep 0.1;
};
r_doLoop = false;
if (_finished) then {
[] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
dayz_sourceBleeding = objNull;
call fnc_usec_resetWoundPoints;
} else {
r_interrupt = false;
[objNull, player, rSwitchMove,""] call RE;
player playActionNow "stop";
player addMagazine "ItemBandage";
};
// START lazyinks Bandage via Scroll Function
_mags = magazines player; //IMPORTANT. IF SELF-BLOODBAG IS INSTALLED, DELETE THIS LINE!
if ((player getVariable["USEC_injured",true]) && ("ItemBandage" in _mags) )then {
isBleedingCheck = true;
} else { isBleedingCheck = false;};
if((speed player <= 1) && isBleedingCheck && _canDo) then {
if (s_player_scrollBandage < 0) then {
s_player_scrollBandage = player addaction[("<t color=""#c70000"">" + ("Bandage Wounds") +"</t>"),"medical\player_scrollBandage.sqf","",6,false,true,"", ""];
};
} else {
player removeAction s_player_scrollBandage;
s_player_scrollBandage = -1;
};
// END lazyinks Bandage via Scroll Function
Really? Let me try to fix that. I have been testing this on Overwatch and the UI is a tad buggy there.
_unit setVariable["medForceUpdate",true];you have to force a medical update I think. Not sure how to do it off the top of my head
I noticed you didn't have this, maybe try with this to get rid of the cross.
r_player_injured = false;
if (_finished) then {
[] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
dayz_sourceBleeding = objNull;
call fnc_usec_resetWoundPoints;
if (_finished) then {
[] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
dayz_sourceBleeding = objNull;
call fnc_usec_resetWoundPoints;
r_player_injured = false;