Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Sesquipedalian on July 21, 2002, 02:18:50 pm
-
I was thinking that it would be a nice thing to implement support for more weapons banks per player-flyable fighter (say, one more for each of primary and secondary). Currently it is possible for a fighter/bomber to have 3 primaries and 4 secondaries, but player-flyable ships can only have 2 and 3 of each respectively. The two major things that will be needed to implement this change are 1) new/modifed images for the HUD, and 2) minor alterations to the HUD code to allow this to be done.
Now, I can't code, but I can and do make 2D art and could easily alter the HUD images to accomodate an extra bank in each if I had someone who could alter the code that is responsible for positioning the ani files on the screen.
Any coders interested in collaborating with me on this?
-
there is a lot of code that asumes there will only be two primarys and three secondarys, and adding HUD graphics has proven a bit more chalenging than I thought it would be,
waiting for someone else to do it so I can do what they did
-
Really? How much code is involved? The Seraphim has three primaries and four secondaries, so obviously anything to do with the fighters themselves, the AI, etc., etc. can handle the added banks. What is involved besides the HUD code?
-
For one, the switching between fighter banks for the player. I haven't looked at the code, but I think the AI has a special function, wheras the human player has to use the keyboard controls. Once you add another primary bank, do you let him fire all three guns at once? Just two? Do those two have to be adjacent? etc etc. So it is indeed a fair amount of work :nod:
-
my solution for primaries: 4 buttons, of the first 3, each one activates/deactivates a bank when pressed, the fourth toggles between banks in a cycle from top to bottom and to all three before going back to the first bank. Use of the fourth button automatically diactivates 2 and 3 and activates 1 on the first stroke. So if you have banks 1 and 3 enabled, you press the fourth button once, only the 1st bank is now enabled, press it again and only the second is, press it again only the third, press it a fourth time and 1 2 and 3 are all enabled, press it a fifth time and you're back to just 1. From any of these, you can activate or deactivate using the other 3 keys.
How to implement this i have no idea.
-
Well, I'd just skip your fourth button there, LtNarol. Here's my plan:
Right now the , and . buttons cycle the primaries forward and backward. We change this so that
1) The , button toggles the first bank on and off.
2) The . button toggles the second bank.
3) The ; button (which is currently unmapped in the default control config) toggles the third.
The secondaries currently cycle one at a time (there is no fire linking for them), and there would be no need to change the way this worked. All that would be necessary would be to get them to cycle through one more before going back tothe first bank,and that oughtn't to be too hard to do.
-
Well Sesqu, I think having a fourth button for general toggle, even if it isnt mapped by default, will be very usefull and convenient for those of us who like to use the joystick for everything :D
-
What if you (well I) need 4 banks or more?
useing the tested 'Full Guns' button is a good idea
I don't know what would be best for individual banks though