-
Notifications
You must be signed in to change notification settings - Fork 15
SKGStockComponent
The purpose of this component is to allow for length of pull (google it) functionality for your stocks along with the ability to fold/unfold. You can collapse and extend a stock like you can on an M4 as well as fold/unfold your stock like on an under folding AK

This option allows you to be able to fold/unfold the stock when true, if false this functionality is ignored.
This option ties hand in hand with the attachment system out of the box. The SKGFirearmComponent will bind to the attachment component of the stock automatically. When you extend or collapse the stock, it will automatically set the offset in the stock component.
This is the length of pull for when the stock is unfolded.
This is the length of pull for when the stock is Folded. For example, on an under folding AK the Unfolded Length Of Pull might be 0 but the Folded Length Of Pull might be -3.
This function is what the attachment system/SKGFirearmComponent automatically handles. For example, if you extend a M4 stock on the buffer tube, you would pass in a value greater than 0 and this would alter your length of pull in game. If Can Be Affected By Offset is false, it nothing will happen.
This function will trigger the stock to fold if Can Be Folded is true.
This function will trigger the stock to unfold if Can Be Folded is true.
If the stock is folded, Unfold will be called. If the stock is unfolded, Fold will be called.
Returns true or false depending on if the stock is folded.
This returns the current value of the length of pull including the offset (if length of pull is 2, and offset is 3, -1 is returned (offset is subtracted from length of pull).
This returns whether or not the stock can be folded.
This returns the default value set for the unfolded length of pull.
This returns the default value set for the folded length of pull.
This event fires each time the stock is folded or unfolded. Passes in the folded state.
This event fires each time the length of pull on the stock changes. Passes in the new length of pull.