summaryrefslogtreecommitdiffstats
path: root/Client/Module/ISIS/ISIS_Wounded.sqf
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-06-11 19:53:22 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-06-11 19:53:22 +0300
commitc055d44dcdb87e8db49fb23e632fc086aa44cce6 (patch)
tree7ac98d865915930bebc86b36b512a859c31538e5 /Client/Module/ISIS/ISIS_Wounded.sqf
downloada2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.tar.gz
a2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.tar.bz2
a2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.zip
init
Diffstat (limited to 'Client/Module/ISIS/ISIS_Wounded.sqf')
-rw-r--r--Client/Module/ISIS/ISIS_Wounded.sqf51
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;