This is included in Custom Items Framework as of v1.3.1This mod lets guns added through the Custom Items Framework support multiple different fire modes. You can do any combination of burst, full-auto, and semi-auto. To make a gun have fire a burst, in unity create an empty as a child of your gun and call it "BurstFiring". Then create another empty as a child of that object and name it with the number of shots you want in your burst. There's an example in the images of how it should look. If you want to change the timeout between bursts, create an empty called "BurstTimeout" and then the child of that should be the timeout in ms. If you're fine with the default timeout of 250ms then you don't need this. To be able to switch between fire modes, create a grip point called "FireModeGrip" and make sure it has the GripEvents component on it. As children of that grip, create empties called "Auto" or "Semi" to enable switching to those fire modes, depending on which ones you want. You don't need one for burst because it's done automatically when you have the "BurstFiring" object. Once that's set up, whenever you grab that grip the gun's fire mode will cycle to the next one. There's an example of a gun with a 3 round burst plus support for full-auto and semi-auto in the images.
v1.2:- Renamed the mod from "Burst Firing" to "Fire Modes" because it supports more than just bursts now. - Added the ability to switch between fire modes.
v1.1:- Added a configurable timeout between bursts. Default value is 250ms.
Last Update Date
2020-07-31, 01:21 AM UTC