do{
if(other.transform.tag == "Player"){ //checking to see who bumps into it(PlayerShip)
Vector3 currentPos = transform.position; //grabbing the position of player
string currentTag = transform.tag; //also grabbing it's tag
if(currentTag == "a_large"){//based on which asteroid is hit, it does something different
GameController.lives1--;
}
else if(currentTag == "a_medium"){
GameController.lives1--;
}
else if(currentTag == "a_small"){
GameController.lives1--;
}
}
}
while(GameController.lives1 > 0);
This is my script. I did the same thing for Score (except it increments, and no do while loop) and it works fine. For some reason though when my collider other with tag "Player" hits asteroid with tag 'a_large' the 'int lives1' goes to 0. I think my syntax is off just trying to get some feedback at how I can fix this remedy.