Quantcast
Channel: Questions in topic: "enemy"
Viewing all articles
Browse latest Browse all 1488

Attack/Kill Difficulties

$
0
0
What I want is when DamageDealt hits 3, the object that was attacked will be destroyed. So far, all it does is to destroy the weapon the player is holding, and not the gameobject that is being killed. Any ideas? This is my code. if(col.gameObject.tag == "Enemy"){ AttackSuccess = true; } if(DamageDealt == 3){ Destroy(gameObject); AttackSuccess = false; } }

Viewing all articles
Browse latest Browse all 1488

Trending Articles