Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Hunger and Thirst Depletion

$
0
0
I am creating a Day-Z like game... In my game you have to find food and water to survive.. I am using this code for depletion... The problem is that I have depletion to 0.1 but for some reason it's going down way to fast.. In the inspector the minimum number allowing is 1.. How can I fix this?

Code (JavaScript):
  1. #pragma strict
  2.  
  3. var lastPositionY : float = 0f;
  4. var fallDistance : float = 0f;
  5. var player : Transform;
  6. private var controller : CharacterController;
  7.  
  8. var currentHealth : float = 100.0;...
Hunger and Thirst Depletion

Viewing all articles
Browse latest Browse all 1466670

Trending Articles