diff options
| author | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:38:09 +0300 |
|---|---|---|
| committer | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:38:09 +0300 |
| commit | a3a91d4f45b22fd487ecbc954ad979be5d03efdd (patch) | |
| tree | a554ab159a347dcd6c00ca1c7c26c1ec3ac0a6bd /Client/Module/ISIS/ISIS_Wounded.sqf | |
| download | a2wf_chernarus-a3a91d4f45b22fd487ecbc954ad979be5d03efdd.tar.gz a2wf_chernarus-a3a91d4f45b22fd487ecbc954ad979be5d03efdd.tar.bz2 a2wf_chernarus-a3a91d4f45b22fd487ecbc954ad979be5d03efdd.zip | |
Diffstat (limited to 'Client/Module/ISIS/ISIS_Wounded.sqf')
| -rw-r--r-- | Client/Module/ISIS/ISIS_Wounded.sqf | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Client/Module/ISIS/ISIS_Wounded.sqf b/Client/Module/ISIS/ISIS_Wounded.sqf new file mode 100644 index 0000000..f474f68 --- /dev/null +++ b/Client/Module/ISIS/ISIS_Wounded.sqf @@ -0,0 +1,51 @@ +Private ["_han","_hasAction","_start","_state","_status","_unit"];
+_unit = _this select 0;
+_start = time;
+_state = "";
+
+if (isPlayer _unit) then {
+ [_unit] Spawn ISIS_Effects;
+};
+
+_han = [nil, _unit, rPLAYACTION, "agonyStart"] call RE;
+sleep 3;
+_han = [nil, _unit, rPLAYACTION, "GestureNod"] call RE;
+
+//--- Add action to west or east units.
+if (side _unit == west || side _unit == east) then {
+ _hasAction = _unit getVariable 'hasAction';
+ if (isNil '_hasAction') then {_hasAction = false};
+ if !(_hasAction) then {
+ WFBE_ISIS_AddAction = [(side _unit),'CLTFNCISIS_ADDACTION',_unit];
+ publicVariable 'WFBE_ISIS_AddAction';
+ if (isHostedServer || local player) then {[(side _unit),'CLTFNCISIS_ADDACTION',_unit] Spawn HandlePVF};
+ };
+};
+
+while {true} do {
+ sleep 0.7;
+
+ _status = _unit getVariable "stunned";
+ if (isNil '_status' || !(alive _unit)) exitWith {_unit removeAllEventHandlers "handleDamage"};
+ if !(_status) exitWith {
+ _han = [nil, _unit, rPLAYACTION, "GestureNod"] call RE;
+ };
+
+ if ((time - _start > 15 || _state != animationState _unit)) then {
+ _start = time;
+ if (((animationState _unit) == "AinjPpneMstpSnonWnonDnon") || ((animationState _unit) == "AinjPpneMstpSnonWrflDnon")) then {
+ _han = [nil, _unit, rPLAYACTION, "GestureNod"] call RE;
+ _state = animationState _unit;
+ _han = [nil, _unit, rPLAYACTION, ("GestureSpasm"+ (str floor random 7))] call RE;
+ };
+ if (((animationState _unit) == "AinjPpneMstpSnonWrflDnon_injuredHealed") || ((animationState _unit) == "AinjPpneMstpSnonWnonDnon_injuredHealed")) then {
+ _han = [nil, _unit, rPLAYACTION, "GestureNod"] call RE;
+ _state = animationState _unit;
+ _han = [nil, _unit, rPLAYACTION, ("GestureSpasm"+ (str floor random 7))] call RE;
+ };
+ };
+
+ _unit setDamage (getDammage _unit + 0.002);
+};
+
+_han = [nil, _unit, rPLAYACTION, "agonyStop"] call RE;
|
