I am currently working on an Inventory System with equip-able items. This is how I have approached the situation so far:
- I have a base item blueprint, and use polymorphism/Inheritance for all my items. So I have a base Weapon blueprint that inherits off of my base item blueprint
- All my base items/weapons ect all use my custom blueprint interface which has interface functions like: DropItem, EquipItem, UnEquip Item etc
- In all my base blueprints that inherit from my base item blueprint, I implement all the interface functions, making sure to add a call to parent
- I have all my functionality inside my base item, so when you pickup an item, it will call the implemented interface function
There are a few ways to go about equipping items, so I’ve found out in my post SetActorLocation weird issue when Simulate Physics Enabled - Blueprint Visual Scripting - Unreal Engine Forums I have a working version, that when you call AttachToComponent on the players skeletal mesh, it will attach the item to the socket described.
As for making your weapon blueprint catch the shoot event, the simplest way I would do this is in your player character blueprint, and the fire Input event and call a new interface function called fire, with all your logic inside the weapon class.
Interface
Implement interface in class settings in your Weapon item blueprint
In the player blueprint, listen for the Fire action key pressed, then call our interface function. You will have to pass in the weapon that is currently equipped. Note: You want to call the interface function that has (message) in the context menu
I keep all my logic inside my base item blueprint. If I want to do something special on a particular type of item, I would add it to say Base Weapons interface function, then call the parents function when I was done with my item specific logic.