I want to make my Zombie deal damage to me. I already added a health script to my first person controller here it is.
var health = 50;
function ApplyDamage (damage : int) {
health -= damage;
if(health <= 0) {
Die();
}
}
function Die () {
Application.LoadLevel (Application.loadedLevel);
}
But i dont know how to make the zombie deal damage my health. Can anyone help