[Solved] Add santa hats to all actors [attach actor to component in all actors]

So I have a game where I used ThirdPersonCharacter Template to make 8 things like Ai enemy that runs after you and try to kill you
now I put a pickup mesh blueprint that was ment to give them all santa hats

I added a socket on the skeletal mesh

this is the blueprint

when I pick it up it gets destroyed and doesn’t add anything because of the DestroyActor
Even when I remove the destroy actor it just appears in the objects list not the editor and only on one actor

50205-14.png

It might have to do with the fact that all your Blueprint code is under the Event “ActorBeginOverlap.” The problem with this is that all the code here only gets called once (when your actor overlaps the other actor/object in question). Try moving your code up to Event “Tick” and have “ActorBeginOverlap” simply call a state. Then, in Tick, when that state is turned on, have it flip on your hat code and, wa-la, you should have hats galore.

I still can’t see it in game and only one actor gets it, like he picks it up from the ground but I want all of them to have it, I don’t know another way to do it but apparently this take the one on the ground and attaches it to the first actor in the array
I can’t just add it in the blue print and hide it because it would be missed up and won’t work with the animations

Oh, the problem is that there’s only one hat mesh and not all of them can have it. You’re going to have to add into blueprint, some code which spawns a new hat mesh for every index in the array. Unless there’s a referencing possibility…

Thank You, It worked! I had to create a separate blue print and make it spawn one for each actor.

Haha, no problem. I’m surprised it was that easy of a fix, as I’m quite tired this morning. :stuck_out_tongue: Anyways, I’ll add an answer, so please select it.

The problem appears to be that you only have one hat mesh with many actors. Simply have a new hat mesh spawn for each index in your actor array, in the blueprint.