Attributes

Attributes are dynamic variables that can be assigned to a weapon via behaviors, to emitter output data assets or to attachment executions. These variables can be assigned a gameplay tag so that any attachment that is applied with that tag will modify all attributes that match the same tag. Attachments can be added and removed at runtime to augment a weapon.

Defining A New Attribute

To use an attribute, simply create the parameter in the header of your class (or as a default variable in BP) and call Register. This will initialize it on the shooting component and will automatically get cleaned up when the object that it is registered with is destroyed.

Note

Override RegisterAttributes in Weapon Behaviors/Emitter Output Data Assets and Setup in Attachment Executions.

Attribute Viewer

The attribute preview section in the weapon data allows you to view all attributes that have been registered with a weapon, along with which component it is registered with. You can also assign attachments to the preview and see how that affects the attributes on the weapon.