Quantcast
Channel: Answers by "podmaster"
Viewing all articles
Browse latest Browse all 30

Answer by podmaster

$
0
0
When you define your health variable do it like this var Health1 : int ; and set the value from the inspector, selecting the gameobject. and i recommend you to try also putting your if code this: if(Health1 > 1000){ Health1 = 1000; } if(Health1 < 0){ Health1 = 0; } inside a function and call it after applying damage. and not from Update() maybe this is causing the problem too.

Viewing all articles
Browse latest Browse all 30

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>