11-29-2015, 07:24 PM
change player to _this .
I called it in unit's init a nul = this execVM "regen.sqf";
Here's taken from a very old zombie mission I made with a boss bloodsucker with increased health
I called it in unit's init a nul = this execVM "regen.sqf";
Here's taken from a very old zombie mission I made with a boss bloodsucker with increased health
Code:
private ["_newDamage","_t"];
while {alive _this} do
{
 _t = time;
 waitUntil {time - _t > 1};
 if (damage _this > 0) then
   {
   _newDamage = (damage _this) - 0.01;
   _this setdamage _newDamage;
   };
 sleep 0.5;
};