Possible? Currently arcs are done by providing x y z co-ords for the direction, and a value to define the size of the cone the weapon can fire in this direction. Request is to be able to define multiple arcs using multiple sets of x y z co-ords; for instance:
"weaponMainDir1=1 0 0, -1 0 0;"
"maxAngleDif1=90;"
-- this would allow the weapon to fire in 90 degree arcs both to the right and left but not forward and rear, comprising an "X-type" firing capability. The ability to define the maxAngleDif for each co-ordinate set isn't particularly necessary (so it wouldnt need MaxAngleDif1=90, 90; for example); it would simply use the one angle-size for both directions.
Multiple Firing Arcs
Moderator: Moderators
-
SpikedHelmet
- MC: Legacy & Spring 1944 Developer
- Posts: 1948
- Joined: 21 Sep 2004, 08:25
Re: Multiple Firing Arcs
can you not use two weapons?
-
SpikedHelmet
- MC: Legacy & Spring 1944 Developer
- Posts: 1948
- Joined: 21 Sep 2004, 08:25
Re: Multiple Firing Arcs
No unfortunately I can not. We're talking about a ship with turrets along the centerline that can shoot on either side but not forward or backward.
- Pressure Line
- Posts: 2283
- Joined: 21 May 2007, 02:09
Re: Multiple Firing Arcs
You can Spiked
IIRC the problem with that is that the larger S44 ships are hitting the weapon limit.
Re: Multiple Firing Arcs
could the turret be a second unit, transported by the ship, having two weapons?
Re: Multiple Firing Arcs
Why is the weapon count limited ?
Re: Multiple Firing Arcs
No idea, but it is just a simple #define in Spring code, can be changed at any time. Would be nice to make it mod-definable imho.
@Spiked:
Can't you do it in unit script by blocking the gun from shooting in directions you don't want and/or ingoring the targets?
@Spiked:
Can't you do it in unit script by blocking the gun from shooting in directions you don't want and/or ingoring the targets?
Re: Multiple Firing Arcs
Raising that #define to something higher (say 64?) would be super handy at times (especially now that we can do lua unitscripts which don't require writing out X number of weapon scripts). That said, I imagine there's a reason it isn't set at some arbitrarily high value already, so letting it be defined by mod would be nice as well.
Re: Multiple Firing Arcs
Spiked: unwanted targets (which cause aiming in restricted arcs) can be filtered script-side, by using set CHANGE_TARGET to <weapon number> (not yet sure how to do that in lua, but afaik no ships apart from my Gangut use lua scripts yet).
Re: Multiple Firing Arcs
Eh? That sounds interesting, do you have an example unit with a bunch of weapons and script I could look at?yuritch wrote:Spiked: unwanted targets (which cause aiming in restricted arcs) can be filtered script-side, by using set CHANGE_TARGET to <weapon number> (not yet sure how to do that in lua, but afaik no ships apart from my Gangut use lua scripts yet).
Re: Multiple Firing Arcs
I'll make an example when I'll get home. Probably using one of S44 ships as a base (they have lots of weapons). You'll need a testing build of S44 to see it though.
Edit: unit files attached. Torpedo launchers on the destroyer are limited by both maxangledif AND script. This seems to work ingame (but this change is not in S44 builds, so I don't have any testing data from naval battles).
Edit: unit files attached. Torpedo launchers on the destroyer are limited by both maxangledif AND script. This seems to work ingame (but this change is not in S44 builds, so I don't have any testing data from naval battles).
- Attachments
-
- pr7.7z
- (72.72 KiB) Downloaded 11 times
