The docs for finding actors in Blueprints by tags have non-sensical Blueprint examples. The page I’m referring to is here:
https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/FindingActors/Blueprints/index.html
According to the write-up under “Get Specific Actors”:
Here we are stating that after we have
collected all Actors of the Class
specified and put them in an Array, we
then check each Actor to see if it has
the Tag we specified and ONLY if it
does, do we deactivate it.
Except that, in the example, the foreach loop grabs all of the tags for the current actor, grabs the tag in position 0, and then compares that tag against the tags that the actor has.
That’s like saying, get me all the apples. Grab the red apple. Is the red apple red?
The main issue with this sample is that it doesn’t just match actors with the desired tag of “Target” – it will match ANY actor with ANY tag. The sample should ditch the part where it grabs Tags and then Tag[0] and just input “Target” in as the literal tag value. That way, “Actor has tag” only applies when we actually find an actor with a tag of “Target”.