help using tags

hi, my problem is that im working in a 2d shooter.
so anyway, what i want to do is: when i get to certain score (for killing enemies) i want the new type of enemys to show up (wich are stronger, faster and move different) so i decide to go using tags, naming the first ones enemy1 and the others enemy2
So the problem that i have is that i cant figure out the way to make the the differenciation, i mean how to make the program know that now i want to work with the enemy2 instead of the enemy1, and make those spawn.

:stuck_out_tongue: hope anyone who read this understand, sorry for my bad english, is not my native language.

thanks for the help in advance.

what i mean is for example something like this:

if (GameObject.tag == “enemy1”)
{
do something
}
else if (GameObject.tag == “enemy2”)
{
do something else
}

i can accept any other recommendations, about how to make the thing i want to do

Are u saying that u wanna spawn stronger enemy when player’s score is higher?

if that is the case, u might consider to spawn the enemy based on Prefab then. Create a spawn script which contain script similar to this.

\

–TwisterK

^^ that would be the simplest solution. Then for more enemy types add more conditions.

Thank you so much, i havent though about doing that

No problem, glad to help.

–TwisterK