Is it possible to limit the field of fire for a turret? Reason being I am coding the Warlock Class Destroyer from Babylon 5 and it has a huge narly railgun on the bow that realistically would not be able to fire at 90+degrees to the port or starboard. Several Earth Alliance ships also have aft batteries that shouldn’t be able to fire forward, batteries on the side of the hull etc. It might be nit picky, but I think it would be cool to be able to do this.
I am also having trouble with the Salvo function on a missile battery. here is the code?
Can you be more specific about the trouble you are having?
The primary thing to remember about missile turrets is that each turret can only have one missile out at a time. From the code you’ve posted, it looks like you’re trying to get several missiles fired in quick succession, then a delay. That sort of thing can be done with bullet, kinetic, plasm and beam weapons, but not missiles.
This code is taken from my Maverick Cluster missile system that i have in development in my Corvettes, Destroyer and Super-Cruiser mod. You need to have has_decoys, and submunitionslive set to 1, Your max_range and decoy_release_range MUST be the same or max_range shorter than decoy_release_range. Or the missile will not look like a salvo. num_submunitions can only be 2 thru 6, any more than 6 will not work and i forgot if it would crash the game or the module will only fire one. I also recommend that if you want the module to do 36 damage and fire a salvo of 6 that you set the damage to 6 and not 36 as the damage is what EACH missile (submunition) will do.
As for limited field of fire For GSB to do that We would need to rewrite the hard code of the game, and then program the AI on how to use such a limited weapon. Cliff or Cliffski as his nickname is on here has moved on to another game and has said that he will not go back over the code except to fix bugs, or update minor things.
Missiles work like plasma used to; each launcher can only have 1 missle (or missle cluster) on the screen at a time, however as long as the fire interval is shorter than the missle’s flight time (determined by speed, fuel and maximum range) as soon as the first missle hits it’s target or dies the second will immediately fire. This will repeat itself until the salvo size is exhausted and then the salvo interval will kick in.
what I do NOT know is whether the new Max simultaneous code for the plasma launcher will apply to missles. My guess is it won’t.