Attach static mesh to player character with notify

Hello, Happy New Year to you. The question is:
I’m making a retro shooter. I set up the selection of weapons, everything works almost without problems.

But!
I made an animation of weapon selection so that when selecting a weapon, it not only visually appears in the backpack, but visually appears in the character’s hand when he picks it up and puts it in the backpack. And it appears. But! The weapon that appears in the player’s character hand its his current weapon. And a new weapon which he is takes appears when selecting the next one, etc. The point is to Notify.
I checked that, I know that for sure.
And I have a question - how do I write this ■■■■ Notify so that the right weapon is displayed?
I didn’t find anything suitable in other places, so I’m asking here.
A screenshot of Notify is attached.

This is probably a late response. Apologies but your question is rather difficult to read.

If I understand your questions correctly; then the solution is that you need to upgrade your weapon display system so that you can initiate it from the AnimNotify without ‘bugging’ and showing incorrect weapon meshes in incorrect locations.

The AnimNotify has limited functionality, the simpliest approach would be to only use it to send a message to your character BP (which you are doing) to say ‘hey, this part of the Montage played, show/hide/something the weapon’.

You need to set up a proper weapon management system on your BP character itself that can:

  • Know what weapons the character can have
  • Know what ‘state’ the weapons are in
  • Manage showing/hiding the weapons from different components and their socket attachments
  • Manage replicating this to other clients (if multiplayer)
  • Have suitable entry/exit points for other blueprints or functions to interact with it (e.g. show/hide/death)

This is a modular coding approach. You may wish to consider a BP Interface to reduce hard dependencies and allow lots of things to call this on your character.

My personal approach; I have one default StaticMeshComponent for my characters main weapon. I then use a management system (GAS Tags) to manage what socket the component is parented to. Each project will be different.

Hope that helps.