This is my first mod.
editors note: please read the update below!
This warhead is designed to create projectiles when trigger is activated.
The warhead requires definitions, which can be altered to change the behaviour, damage and projectile count. rate of fire is included, as this mod essentially emulates an auto-cannon, however the trigger only fires once, so it acts more like a delay if any effect at all.
COMPOSITE INPUTS:
[list]
[*] [1]: Projectile type -> Entry from 0-14: The 14 projectiles in Stormworks (Frags -> Bertha).
[*] [2]: Damage type -> Entry from 0-4: The base ammo types (Kinetic -> Incendiary)
[*] [3]: Rounds/Second -> Mostly redundant, set it to a arbitrary value (28).
[*] [4]: Velocity -> Affects projectile speed: <200 = high arc, >1000 = straighter arc.
[*] [5]: Payload -> The volume of projectiles thrown at the enemy on trigger.
[*] [6]: Cone -> The spread of projectiles on trigger.
[/list]
Considerations:
High values of payload can cause server issues, so i would limit the payload to below 1000 on servers, to prevent a lag storm from hit boxes.
The lifespan of the projectiles also is delayed, which means a block directly in-front of the warhead will not interfere with the splash pattern (tested with 1 block). for this i recommend (and use) a distance sensor, to trigger the air burst when at the desired altitude above the enemy.
hope you enjoy my mod!
UPDATE:
Added requested spread value.
The updated mod has a new value on composite 6 called cone. The spread of the air burst can be adjusted by increasing this value.
The default value (original setting) is 50, or 25m/s adjustment in adjacent directions (added to the velocity of projectile).
Considerations:
The spread of the projectile is relative to its initial velocity. If your bullet velocity is 200 m/s, and cone is 200 m/s, then the result is spread random in a 45 degree arc in both directions from the direction of the warhead (90 total).
If you would like the cone as an angle, the best way to do it is to take:
Velocity(comp input 4) / 90 (degrees) = Scaler
Scaler x Angle-wanted = cone
Example:
bullet travelling at 200 m/s, want a spread of 70 degrees:
200 / 90 = 2.22...
2.2 * 70 = 154
cone = 154
I have created another vehicle as an example, with an updated Micro-controller on missiles for ease of use:
[url=https://steamcommunity.com/sharedfiles/filedetails/?id=3606642299]https://steamcommunity.com/sharedfiles/filedetails/?id=3606642299[/url]
Have fun!