Download

Adding tags to projectiles

Hi,

so i’m using the 1st person blueprint and wanted to add damage to actors when they get hit by the projectiles fired by the player.

So I altered the spawn projectile routine to set a tag to the projectile that was spawned like this :

930a6eef8820e64758bbf0d1654483abd1c7ec8a.png

But when I check the tags associated i get blank.

(7046a0bf4f627dc94ca1c3bb1dcafc8eb4f1bd74.png)

How can I fix this?

I assume the problem is how you set the tags. Are you sure you’re setting the ACTOR tags and not the COMPONENT tags? They’re actually different.

I’m setting the tags in the first image. Is it not right?

Hello,
As “tags” is an array, you need to “get” from it or to " for each loop" if you have more than one tag, to compare it to the tag value you are looking for.
edit : as in https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/FindingActors/Blueprints/index.html

https://docs.unrealengine.com/latest/images/Gameplay/HowTo/FindingActors/Blueprints/Actors12.jpg

the actor has tag node doesn’t do that automatically? You are saying i have an error in the setting of the tag or in checking for the tag?
And i just have one tag “Projectile”

Have you tried simply tagging the Actor itself (using the Defaults panel in the blueprint for it) rather than dynamically adding tags and seeing if that works?

the projectiles don’t exist when the game starts so i just have a blueprint of the projectiles and i don’t see the tags there.

check the link : https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/FindingActors/Blueprints/index.html#getspecificactors, you have there and how to set tag in blueprint by using details / tag and the example i gave you before.