Quantcast
Channel: Answers by "maxkunes"
Viewing all articles
Browse latest Browse all 18

Answer by maxkunes

$
0
0
Next time please give more detail with your issue, but I think your having issues with multiple else if's functions. I believe with most coding languages in normal and unity can only use one else per if function. So I think if you replace every other else if with a if function than it should work. if(col.tag == "Enemy") { col.gameObject.GetComponent().Hurt(Damage); //Destroy Projectile Destroy(gameObject); } else if(col.tag == "BlackFlying") { col.gameObject.GetComponent().Hurt(Damage); //Destroy Projectile Destroy(gameObject); } if(col.tag == "FioletHuynya") { col.gameObject.GetComponent().Hurt(Damage); //Destroy Projectile Destroy(gameObject); } else if(col.tag == "Ship1_3") { col.gameObject.GetComponent().Hurt(Damage); //Destroy Projectile Destroy(gameObject); } I am not sure if this was your issue because I didnt fully understand your problem more detail would help... ***Code not tested but will most likely work***

Viewing all articles
Browse latest Browse all 18

Trending Articles