Quantcast
Channel: Latest Questions by ryno9788
Viewing all articles
Browse latest Browse all 91

simple health system

$
0
0
I need help with my simple health system. It has many errors in that need to be cleaned up. This is my first health script and I need to know how I can get it to work like I want it to. var health = 100.0; private var dead = false; var DamageA = -10.0; function OnControllerColliderhit(hit : ControllerColliderHit) { if(hit.gameObject.tag=="fireball") { health + DamageA; } } function LateUpdate() { if (0 > health) { dead = true; } if(dead) = true { transform.position = Vector3(0,0,0); dead = false; } }

Viewing all articles
Browse latest Browse all 91

Trending Articles



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