From Bohemia Interactive Community
Notes
- Posted on 05 April, 2014
- Killzone_Kid
-
setFatigue will affect fatigue of a local unit only. If you execute it on remote unit, the getFatigue value will only change locally with no effect on remote unit. Scripted setFatigue changes don't broadcast at all. In short, use setFatigue on local units only.
- Posted on 15 October, 2015
- Pierre MGI
-
Usage of this command is tricky as the fatigue is always changing! You need to use a loop for enabling a "stable level" of fatigue.
If you want to limit the fatigue for players in a group, just add in init.sqf, something like:
0= [] spawn {
{while {alive _x} do {scopename "fatigued"; sleep 0.5; waituntil {sleep 0.5; getFatigue _x > 0.4 }; _x setFatigue 0.4}; breakTo "fatigued"} forEach units my_group;
};
Precision tends to be reached with smaller value of sleep commands, probably at the cost of CPU load * nbr of players/units in group.
This works for AI units as well.
Bottom Section