Staggered Fire Controller
This controller allows you to fire multiple guns of the same type in a staggered fashion, also known as alternating fire.
While doing so, it keeps the time between the individual shots as short as possible, while allowing the guns to reload. This way, the number of rounds per minute is maximized.
Configuration
Once placed, the microcontroller can be easily configured, using the workbench's "select" tool. Out of the box, it supports 2-4 guns of one of the following types:
[list]
[*] Machine Guns
[*] Light Autocannons
[*] Heavy Autocannons
[/list]
Support for more guns
While, out of the box, this controller supports up to 4 guns, it can be extended rather easily, to support up to 32 guns of the same type, if you have some basic Stormworks microcontroller editing skills.
[list]
[*] Add on/off outputs for the additional triggers, as desired ("Trigger 5", "Trigger 6", "Trigger 7", etc., up to "Trigger 32")
[*] Re-size the microcontroller to fit all the additional trigger outputs and move all these outputs to free spaces on the microcontroller (you may want to arrange them in a way that is easy to follow)
[*] Add as many "Composite Read (on/off)" logic gates to the microcontroller's logic, as you have added triggers and set them to the corresponding channels ("channel: 5", "channel: 6", "channel: 7", etc.)
[*] Connect the "Composite Read (on/off)" inputs to the Lua Script's composite output and their outputs to their corresponding on/off outputs for triggers ("channel: 5" to "Trigger 5", "channel: 6" to "Trigger 6", etc.)
[*] In the property slider "Gun count", set the "Max Value" to the new maximum number of supported triggers.
[*] Save (optional) and update the microcontroller
[*] Configure the microcontroller's "Gun count" to the desired value, using the workbench's "select" tool, as described above
[/list]
No change to the Lua script is necessary.
Usage
[list]
[*] Be aware that all guns spawn unloaded. So when firing a gun for the first time after spawning, you will have to hold the trigger for a little longer for the gun to load and fire.
[*] You may modify and upload this controller as part of your own creations, as long as you give credit by linking to this original.
[/list]