Hello - Will,
My script is unfortunately not working, no errors, just not working, written myself.
var Health = 100;
var healthcount : Transform;
var Enemy : Transform;
var healthText;
var Damage = 10;
function Start()
{
healthText = healthcount.transform.GetComponent.<TextMesh>();
}
function OnCollionEnter(other : Collision){
if (other.GameObject.tag == "Enemy"){
Health = Health - Damage;
}
if (Health <= 0)
{
Application.LoadLevel(Application.loadedlevel);
}
}
function Update()
{
healthText.text = Health.ToString();
}