Spawned Actor does not has any tags

Hi, guys.
I’m trying to make a type of scoring system in which when a bullet hits a target, points are added to the total score.

So I made two blueprint actors, “bullet” and “target”. When a target is hit by something, it gets “Other” from “Event Hit” checking the tags in it.

My problem is that there is no tags in the “Actor” I got “Other” from, and I checked the “Bullet” when it spawned, it has the tags fine.

Do you know what seems to be the problem?

Thanks.

Hi Yongsoon,

It should work. I think problem in tag setting. Could you please show how you do it?

In addition, you can create base blueprint class for you bullet blueprints and use Cast To node:

Best regards,

Thanks, . Your advice works for me.

But I still have a question with using tags, and want to know what is the problem exactly.

Here’s what I did.

And when it was spawning, I can find the tag attached correctly, like below,

It seems like that the bullet lost it’s tag attached during flying.

Might I have missed something?

Hi Yongsoon,

I tested your blueprint and it is working correctly. Make some other tests:

In addition, you can put this in projectile tick to determine moment when bullet loses/changes tags.

The Even Hit gives you the BaseClass of the “Other” Actor. I guess the Tags are only stored inside the Child Class, like additional Variables are.

So to get access to the Tags, you would need to cast it to your specific Child Class (Blueprint).

But since managed to get the Tags directly instead of using “Actor has Tag”, i think i’m either wrong, or you can use “Get Tags” for every Actor, without casting him :X

You could just test it :smiley:

Thanks for answer , eXi.

Casting is always successful. but tags are still not appeared.

In my test, I found several things following :

  • Spawned actor always has it’s tag, even without casting to MyProjectile. (before hit)
  • Other object from hit never has it’s tag, even with Casting to MyProjectile.
  • Other object always have empty Tags(It’s length is 0), even with Casting to MyProjectile.

Casting is always successful, so I can identify my bullets without tag, but I still have no idea that where I missed.

Due to my real project, I never have tested it in latest UE4. I’ll try it later, anyway. Thanks for help.

I had sort of the same problem, and I solved it by Setting Tags in the construction Blueprint. Hope this helps :slight_smile:

For anyone that runs into this. If you are using the “Actor has Tag” node, make sure that you put your tags under “Actor” settings. You have to click the “down arrow” to see that option. I’m not sure why is it that the tags under “Actor” don’t display by default.