The bis_fnc_reviveOnState is weird for status #2 (incapacitated state) and broken for status #3 (death state).
States are defined like this (inside function):
#define STATE_RESPAWNED 0 #define STATE_REVIVED 1 #define STATE_INCAPACITATED 2 #define STATE_DEAD 3
First of all, playing in SP or MP without respawn settings, gives multiple errors with status #2 . No interest for status 0,1 & 3 but some weir behaviors with player
Errors are:
12:44:04 Error in expression < bis_revive_ppBlur ppEffectAdjust [0]; {_x ppEffectCommit 0; _x ppEffectEnable t> 12:44:04 Error position: <_x ppEffectCommit 0; _x ppEffectEnable t> 12:44:04 Error Undefined variable in expression: _x 12:44:04 File a3\functions_f_mp_mark\revive\fn_reviveBleedOut.sqf..., line 51 12:44:04 Error in expression < bis_revive_ppBlur ppEffectAdjust [0]; {_x ppEffectCommit 0; _x ppEffectEnable t> 12:44:04 Error position: <_x ppEffectCommit 0; _x ppEffectEnable t> 12:44:04 Error Undefined variable in expression: _x 12:44:04 File a3\functions_f_mp_mark\revive\fn_reviveBleedOut.sqf..., line 51 12:44:04 Error in expression < bis_revive_ppBlur ppEffectAdjust [0]; {_x ppEffectCommit 0; _x ppEffectEnable t> 12:44:04 Error position: <_x ppEffectCommit 0; _x ppEffectEnable t> 12:44:04 Error Undefined variable in expression: _x 12:44:04 File a3\functions_f_mp_mark\revive\fn_reviveBleedOut.sqf..., line 51 12:44:04 Error in expression <_timeStart = time; private _timeTotal = bis_revive_bleedOutDuration; private _bl> 12:44:04 Error position: <bis_revive_bleedOutDuration; private _bl> 12:44:04 Error Undefined variable in expression: bis_revive_bleedoutduration 12:44:04 File a3\functions_f_mp_mark\revive\fn_reviveBleedOut.sqf..., line 40 12:44:04 Error in expression < { _unit setVariable [ "#rev_bleed", _bleed]; }; _unit != player || {_blood> 12:44:04 Error position: <_bleed]; }; _unit != player || {_blood> 12:44:04 Error Undefined variable in expression: _bleed 12:44:04 File a3\functions_f_mp_mark\revive\fn_reviveBleedOut.sqf..., line 80 12:44:04 Error in expression <age",0]; _bleed = (time - _timeStart) / _timeTotal; if (eyePos _unit select 2 > 12:44:04 Error position: <_timeTotal; if (eyePos _unit select 2 > 12:44:04 Error Undefined variable in expression: _timetotal 12:44:04 File a3\functions_f_mp_mark\revive\fn_reviveBleedOut.sqf..., line 61 12:44:04 Error in expression <bis_revive_ppBlur ppEffectAdjust [0]; {_x ppEffectCommit 1} forEach [bis_revive> 12:44:04 Error position: <_x ppEffectCommit 1} forEach [bis_revive> 12:44:04 Error Undefined variable in expression: _x 12:44:04 File a3\functions_f_mp_mark\revive\fn_reviveBleedOut.sqf..., line 107 12:44:04 Error in expression <bis_revive_ppBlur ppEffectAdjust [0]; {_x ppEffectCommit 1} forEach [bis_revive> 12:44:04 Error position: <_x ppEffectCommit 1} forEach [bis_revive> 12:44:04 Error Undefined variable in expression: _x 12:44:04 File a3\functions_f_mp_mark\revive\fn_reviveBleedOut.sqf..., line 107 12:44:04 Error in expression <bis_revive_ppBlur ppEffectAdjust [0]; {_x ppEffectCommit 1} forEach [bis_revive> 12:44:04 Error position: <_x ppEffectCommit 1} forEach [bis_revive> 12:44:04 Error Undefined variable in expression: _x 12:44:04 File a3\functions_f_mp_mark\revive\fn_reviveBleedOut.sqf..., line 107 12:44:04 Error in expression <n = 11; }; _unit setDamage 1; }; bis_revive_ppColor ppEffectAdjust [1,1,0> 12:44:04 Error position: <bis_revive_ppColor ppEffectAdjust [1,1,0> 12:44:04 Error Undefined variable in expression: bis_revive_ppcolor 12:44:04 File a3\functions_f_mp_mark\revive\fn_reviveBleedOut.sqf..., line 103 12:44:05 Error in expression <ve_ppVig, bis_revive_ppBlur]; sleep 1; {_x ppEffectEnable false} forEach [bis_re> 12:44:05 Error position: <_x ppEffectEnable false} forEach [bis_re> 12:44:05 Error Undefined variable in expression: _x 12:44:05 File a3\functions_f_mp_mark\revive\fn_reviveBleedOut.sqf..., line 109 12:44:05 Error in expression <ve_ppVig, bis_revive_ppBlur]; sleep 1; {_x ppEffectEnable false} forEach [bis_re> 12:44:05 Error position: <_x ppEffectEnable false} forEach [bis_re> 12:44:05 Error Undefined variable in expression: _x 12:44:05 File a3\functions_f_mp_mark\revive\fn_reviveBleedOut.sqf..., line 109 12:44:05 Error in expression <ve_ppVig, bis_revive_ppBlur]; sleep 1; {_x ppEffectEnable false} forEach [bis_re> 12:44:05 Error position: <_x ppEffectEnable false} forEach [bis_re> 12:44:05 Error Undefined variable in expression: _x 12:44:05 File a3\functions_f_mp_mark\revive\fn_reviveBleedOut.sqf..., line 109 12:44:05 Error in expression <p 1; {_x ppEffectEnable false} forEach [bis_revive_ppColor, bis_revive_ppVig, bi> 12:44:05 Error position: <bis_revive_ppColor, bis_revive_ppVig, bi> 12:44:05 Error Undefined variable in expression: bis_revive_ppcolor 12:44:05 File a3\functions_f_mp_mark\revive\fn_reviveBleedOut.sqf..., line 109
probably due to undefined variables in BIS_fnc_reviveBleedout.
Now, in MP session, with MP respawn / revive settings:
- If you apply ["#rev",2,aUnit] call BIS_fnc_reviveOnState ; on aUnit (or cursorObject or any unit you call), there is no error, but all ppEffects apply shortly on player . That's weird because you're not supposed to be incapacitated! The unit falls unconscious. That's a good point.
- if you apply ["#rev",3,aUnit] call BIS_fnc_reviveOnState ; Nothing happens at all.
PLEASE, add conditions for exiting before errors (on multiplayer and respawn enabled), skip the ppEffects when the unit is not the player, make status #3 operational (should kill the unit).