I couldn't go through all 36 thread pages, but a search didn't turn up anything. This code generates a negative number of seconds for the countdown, anyone know how to fix?
Code:_bloodbagTime = time - lastBloodbag; // Variable used for easy reference in determining the self bloodbag cooldown _bloodbagUsageTime = time; if(_bloodbagTime < _bloodbagLastUsedTime) exitWith { // If cooldown is not done then exit script cutText [format["You've already received blood, please wait %1",(_bloodbagTime - _bloodbagLastUsedTime)], "PLAIN DOWN"]; //display text at bottom center of screen when players cooldown is not done
Don't think of it as code, think of it as simple mathematics. If you invert the calculation it will show a positive number.
Code:
(_bloodbagLastUsedTime - _bloodbagTime)
Hadn't really noticed that before haha.