SadBoy1981 Posted October 22, 2014 Report Share Posted October 22, 2014 I want to dissable animations when use medic. How to edit code? bandage.sqf // bleed.sqf private ["_started","_finished","_animState","_isMedic","_id","_unit","_display"]; disableserialization; _unit = (_this select 3) select 0; call fnc_usec_medic_removeActions; r_action = false; if (vehicle player == player) then { //not in a vehicle player playActionNow "Medic"; }; [1,1] call dayz_HungerThirst; 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 && !_isMedic) then { r_doLoop = false; _finished = true; }; if (r_interrupt) then { r_doLoop = false; }; if (vehicle player != player) then { sleep 3; r_doLoop = false; _finished = true; }; sleep 0.1; }; r_doLoop = false; if (_finished) then { _num_removed = ([player,"ItemBandage"] call BIS_fnc_invRemove); if(_num_removed == 1) then { if (vehicle player != player) then { _display = findDisplay 106; _display closeDisplay 0; }; if ((_unit == player) || (vehicle player != player)) then { //Self Healing _id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf"; dayz_sourceBleeding = objNull; } else { /* PVS/PVC - Skaronator */ PVDZE_send = [_unit,"Bandage",[_unit,player]]; publicVariableServer "PVDZE_send"; [player,20] call player_humanityChange; }; {_unit setVariable[_x,false,true];} count USEC_woundHit; _unit setVariable ["USEC_injured",false,true]; }; } else { r_interrupt = false; if (vehicle player == player) then { [objNull, player, rSwitchMove,""] call RE; player playActionNow "stop"; }; }; painkiller.sqf // bleed.sqf private ["_id","_unit","_num_removed"]; disableserialization; //CPC Glitch Fix if ((player getVariable ["NORRN_unconscious", true])) exitWith {systemChat ( "Ты же без сознания..." );}; _unit = (_this select 3) select 0; call fnc_usec_medic_removeActions; r_action = false; _num_removed = ([player,"ItemPainkiller"] call BIS_fnc_invRemove); if(_num_removed == 1) then { if (vehicle player != player) then { _display = findDisplay 106; _display closeDisplay 0; }; _unit setVariable ["USEC_inPain", false, true]; if (vehicle player == player) then { //not in a vehicle player playActionNow "Gear"; }; if ((_unit == player) || (vehicle player != player)) then { //Self Healing _id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf"; } else { [player,20] call player_humanityChange; }; sleep 1; //clear the healed player's vision /* PVS/PVC - Skaronator */ PVDZE_send = [_unit,"Painkiller",[_unit,player]]; publicVariableServer "PVDZE_send"; }; Link to comment Share on other sites More sharing options...
0 Proximus Posted October 22, 2014 Report Share Posted October 22, 2014 I dont know if the script will still work if you just remove the whole line? Bandage.sqf player playActionNow "Medic"; Painkille.sqf player playActionNow "Gear"; Link to comment Share on other sites More sharing options...
0 SadBoy1981 Posted October 22, 2014 Author Report Share Posted October 22, 2014 I dont know if the script will still work if you just remove the whole line? Bandage.sqf player playActionNow "Medic"; Painkille.sqf player playActionNow "Gear"; not working if i delete or change playActionNow Link to comment Share on other sites More sharing options...
0 jahangir13 Posted October 22, 2014 Report Share Posted October 22, 2014 I guess because there is a check later for this move. If player move is medic or something...in pseudo code. To check the time the animation is running. I don't have the code on my mind...but maybe you can simply set this time very short. Maybe 0 is possible. Depends on the code. Ah. The code is in the spoiler. What if you set r_doloop to false above the loop? And finished to true. Link to comment Share on other sites More sharing options...
0 SadBoy1981 Posted October 22, 2014 Author Report Share Posted October 22, 2014 I guess because there is a check later for this move. If player move is medic or something...in pseudo code. To check the time the animation is running. I don't have the code on my mind...but maybe you can simply set this time very short. Maybe 0 is possible. Depends on the code. Ah. The code is in the spoiler. What if you set r_doloop to false above the loop? And finished to true. not working Link to comment Share on other sites More sharing options...
0 jahangir13 Posted October 22, 2014 Report Share Posted October 22, 2014 No, you comment out this: player playActionNow "Medic"; (bandage script here) And you set this: r_doLoop = false; _finished = true; And I do not see why this should not work. It just does not go unto the while loop anymore as far as I see this on my phone. Link to comment Share on other sites More sharing options...
0 SadBoy1981 Posted October 22, 2014 Author Report Share Posted October 22, 2014 No, you comment out this: player playActionNow "Medic"; (bandage script here) And you set this: r_doLoop = false; _finished = true; And I do not see why this should not work. It just does not go unto the while loop anymore as far as I see this on my phone. Yep, working without animation. Thanks Link to comment Share on other sites More sharing options...
Question
SadBoy1981
I want to dissable animations when use medic.
How to edit code?
bandage.sqf
painkiller.sqf
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now