This component is the basis of an inventory system regarding weapons. At the moment, you can attach a weapon and detach it. In future updates, this component will be greatly improved.
You can add this component to your character, you just have to specify the name of the socket that will be used to attach the weapon to the right hand.
If you are using the Impact Ranged Weapon class, then the attachment is automatic.
Class Function #
- Attach Weapon : Attach weapon that derive from AActor to pawn.
- Detach All Weapons : Detach all weapons from pawn.
- Detach Weapon : Detach desired weapon from pawn.
- Get Objects in Inventory : Get all objects in inventory.
- Get Objects in Inventory by Class : Get only objects in inventory that derive from specified class.
- Get Objects in Inventory by socket : Get only objects in inventory that is attached to specified socket.
- Get Attachment Mesh : Returns the mesh that is used to attach weapons/objects.
- Set Attachment Mesh : Assigns a new mesh that will be used to attach weapons/items.
Class Settings #
- Auto Find Component : If this feature is enabled, the mesh that will be used to attach weapons/items will be assigned automatically based on the component name.
- Component Name : Component name for automatic assignment.
- Right Hand Socket Name : Socket name for weapon attachment.
Event #
- On New Weapon Added : Triggered when a new weapon is added to inventory.
- On Weapon Removed : Triggered when a weapon in inventory is released.