Hello all,
I have a change-able character (a game object as a parent and there are 2 characters as child in it) (as an example you can assume a human can turn to a werewolf)
Now I can access to the parent`s tag easily and enemies work well. But what if I want a special enemy be able to attack to the tag "Human" only? (parent has a "Player" tag and child has "Human" and " Werewolf" tag) By changing the tag for enemy to follow then it is not work. (means in codes instead of using "Player" tag using "Human" or "Werewolf" which are child) So how can I use a tag in children? I am appreciate for any help.
void OnTriggerStay2D(Collider2D other)
{
if(other.tag=="Player" && ...)
↧