hello people, I wanted to ask you a question
how do I create a new type of beam
we know that there is a type 1, type 2, type 3 and type 4
You can create other types? for other uses?
regards
You forgot type 0
0 = Standard
1 = slash
2 = targeting (for subspace bombs)
3 = multi-shot (AAA)
4 = fires only straight ahead (used for some RBCs)
Actually, I can foresee a couple more beam types, mainly for fighter-mounted, though the first one could simply be made into a modification of type 0
5 = beam with non-fixed duration
Tables determine warmup and cooldown time and sounds, as well the sound for the beam when firing, but the actual duration of the beam depends on how long the player keeps the fire button down, and how much weapon energy the ship has. Basically, beam stops if the player releases the fire button, or if the ship's weapon energy is depleted. Could possibly be done by introducing this behavior to type 0, when the duration time is set to -1.
6 = chargeable
In this version, the amount of damage the weapon can do per spot depends on how long the fire button is depressed. Brief taps of the fire button will produce individual beam shots, with a table defined minimum damage. If you hold down the fire button, it will continue to charge up the beam but not fire it, until you release the button, at which time a beam with a greater per-shot damage value will fire. Tables would define the maximum and minimum damage, how much weapon energy it sucks for the minimum pulse, and how much it sucks per second of charge time. Tables could also perhaps define a figure on minimum and maximum beam duration, so the quick-fire shots might only last 0.25 seconds, while a full-charge shot would last 1 second. Might also be beneficial if it could be made to enable lock-targeting like a turret.
Just some ideas.