|
Hey everybody I amtrying to get my enemy damage to work. I have my player to attack the enemy, and when he attacks the enemy he should die. I dont have any animation set up for the death, I just want the enemy to be destroyed. So far I have this // sound clips: var struckSound : AudioClip; var health = 3; function ApplyDamage( amount : int ) {
} function Die() {
} when I attack the enemy the editor stops and gives me the error the prefab you want to instantiate is null. What does this mean? I get this error everytime a run it.
(comments are locked)
|
|
Here's the scripts i use i hope they can help Here's the PlayerHealth script but it has GUI problems:
and here's the EnemyAttack:
(comments are locked)
|

You should click the error to see the line causing the problem, I don't see anything wrong here.
The error is likely from another part of the script