How can you make an AI character cause damage to the player if it touches it.
If needed my health script is:
var healthdead : Texture2D; //dead var health1 : Texture2D; //one hit left var health2 : Texture2D; //two hits left var health3 : Texture2D; //three hits left var health4 : Texture2D; //four hits left var health5 : Texture2D; //five hits left var health6 : Texture2D; //six hits left var health7 : Texture2D; //seven hits left var health8 : Texture2D; //eight hits left var health9 : Texture2D; //nine hits left var health10 : Texture2D; //ten hits left var health11 : Texture2D; //eleven hits left var health12 : Texture2D; //twelve hits left var health13 : Texture2D; //thirteen hits left var health14 : Texture2D; //fourteen hits left var health15 : Texture2D; //fifteen hits left var health16 : Texture2D; //sixteen hits left var health17 : Texture2D; //seventeen hits left var health18 : Texture2D; //eighteen hits left var health19 : Texture2D; //nineteen hits left var health20 : Texture2D; //twenty hits left var health21 : Texture2D; //twenty one hits left var health22 : Texture2D; //twenty two hits left var health23 : Texture2D; //twenty three hits left var health24 : Texture2D; //full health static var LIVES = 24; function Update () { switch(LIVES) { case 24: guiTexture.texture = health24; break; case 23: guiTexture.texture = health23; break; case 22: guiTexture.texture = health22; break; case 21: guiTexture.texture = health21; break; case 20: guiTexture.texture = health20; break; case 19: guiTexture.texture = health19; break; case 18: guiTexture.texture = health18; break; case 17: guiTexture.texture = health17; break; case 16: guiTexture.texture = health16; break; case 15: guiTexture.texture = health15; break; case 14: guiTexture.texture = health14; break; case 13: guiTexture.texture = health13; break; case 12: guiTexture.texture = health12; break; case 11: guiTexture.texture = health11; break; case 10: guiTexture.texture = health10; break; case 9: guiTexture.texture = health9; break; case 8: guiTexture.texture = health8; break; case 7: guiTexture.texture = health7; break; case 6: guiTexture.texture = health6; break; case 5: guiTexture.texture = health5; break; case 4: guiTexture.texture = health4; break; case 3: guiTexture.texture = health3; break; case 2: guiTexture.texture = health2; break; case 1: guiTexture.texture = health1; break; case 0: //gameover script here break; } }