-
Notifications
You must be signed in to change notification settings - Fork 9
SKGFirearmAttachmentStatComponent
The purpose of this component is to allow for a generic way of handling stats that is non restrictive. This component is intended to be extended by blueprint and C++ devs.
This is the data asset to be used that defines the stats.
By default, this data asset contains values for Weight, Ergonomics, Accuracy, Vertical Recoil, Horizontal Recoil, Muzzle Velocity Percentage, and Fire Rate Change Percentage.
The reason a data asset was used is so it can be extended in blueprint because C++ structs cannot be extended in blueprint.
This function simply returns the set Data Asset of the component.
This function gets called each time an SKGFirearmAttachmentStatComponent is added. The implementation by default adds the provided stats together so if you still want that functionality but also want to extend it, make sure to call the parent function/Super.
This function gets called each time an SKGFirearmAttachmentStatComponent is removed. The implementation by default subtracts the provided stats so if you still want that functionality but also want to extend it, make sure to call the parent function/Super.
This function is where the freedom is. It gets called each time the firearm stats replicate so the calculation is done locally so you can affect it differently for local and remote clients if you wish. In here you define how each stat affects each procedural system. By default it simply uses the default values set in the details panel of the SKGProceduralAnimComponent.