default.txt 376 B

123456789101112131415
  1. /***
  2. Arma Scripting File
  3. Edition: 0.13
  4. ***/
  5. // Enable eating to improve health.
  6. _unit addAction ["Eat Energy Bar", {
  7. if (_this getVariable ["EB_NumActivation", 0] > 0) then {
  8. _this setDamage (0 max (damage _this - 0.25));
  9. } else {
  10. hint "You have eaten it all";
  11. };
  12. // 4 - means something...
  13. ["EB_Eaten", _this, 4] call events_notify;
  14. }];