Jump to content

Recommended Posts

How do you make a timer that only displays to the incapacitated players showing them how much time they have left until they bleed out? I tried using hints but ran in to too many problems

Share this post


Link to post
Share on other sites

Probably not the best way but you can try that:

 

In initPlayerLocal.sqf (create it at mission root if not existing, but should already exists for MP scenario):


 

player addEventHandler ["animChanged", {
  params ["_unit","_anim"];
  if ("uncons" in toLowerAnsi _anim) then {
    [_unit,_anim] spawn {
      params ["_unit","_anim"];
      private _time = diag_tickTime -3;
      while {lifeState _unit == "incapacitated"} do {
        hintSilent str round (bis_revive_bleedOutDuration - (diag_tickTime -_time));
        uisleep 1
      };
      hintSilent ""
    }
  }
}];

 

  • Like 1

Share this post


Link to post
Share on other sites

Thanks, I will try it later and let you know if it works

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×