How to Ignore Self tag??

I have a game Object that is an AI. It attacks all enemies with the tag “Enemy”. But If his own tag is also “Enemy”, how can I make him ignore it, while still keeping the tag “Enemy”?

There has to be a term or function for ignoring self tag.
Oh maybe thats it! How to ignore self tag??

thanks!

Once you have the gameobject and you’ve verified that it has the correct tag, check whether it’s the same gameobject as the object doing the checking:

   if (gameObjectWithTag != this.gameObject)
    {
    	// attack
    }

if you but all objects found in a list or array you can make the object remove it self from that list and then do what you want with the rest