I cant seem to find the errors in my script could someone point them out so I can fix them?
Code :
#pragma strict
var damageDelay = 3.0;
var Spikes : boolean;
var Jab : AudioClip;
function Start () {
}
function Update () {
if(InSpikes = true){
yield WaitForSeconds(damageDelay);
Health.HP = Health.HP - 1;
audio.PlayOneShot(Jab);
}
}
function OnTriggerEnter (){
InSpikes = true;
}
function OnTriggerExit (){
InSpikes = false;
}
↧