Decay is a flag. It is either positive or off.
As for making a beam higher damage at closer range, make it a primary weapon and add a few more primary weapons that are invisible with limited range. They should probably be projectiles with no sprite, just cos of the low maxbeamsonscreen.
As for charging beams, I'm probably stealing my plugs thunder, but given its current status as vapor ware, whatever: There are two methods I developed. One: when weapons fire, and you have a bunch with the 'locks others out while firing' flag, it starts at the lower ids and works its way up. So you make a weak beam that lasts a few frames, then when it starts to cool down (long cooldown), you are able to fire a medium beam that still only fires a few framed before it is forced to cool down, then, only while both of those are busy cooling down, you can fire the biggest one. Note this might not work so well for AI that get to chose their weapon. BUt I havent tested it, nor if the locks others out while fires flag is recognised by the AI. If you give the beams all the same range, and maybe made the first two free while the third cost fuel, it might be enough for the AI to use it properly.
A different method I thought of is only appropriate on ships for whom the charging beam is the only weapon available. Things like the death star that have not much else to speak of, designed to have escorts. Just make folding sprites that look like the charge (like that little glow of charge marching accross the saucer in star trek, or the green beams firing out of the disk for the Star of Death, you know, stuff like that).
Ive not actually got either of these working, mostly because my time is spent on stuff other than gratuitous folding sprites, but based on the behavior of the default scenario (most notably the asteroid miner as a T0), i see no reason the folding should not work, and ive already done tests very similar to the beam test, only with projectile weapons. (IE a few shots of soemthing weak, then a few shots of the medium, then a stream of some third flavor).
(note also that coronas DO do damage. This was where the infinite beam damage came from, certain combinations of refiring beam causes a beam with a corona to keep refiring, while older copies are still decaying, and the decaying coronas each do the full damage of the beam, adding up exponentially.)
Thoughts?
This post has been edited by NebuchadnezzaR : 09 May 2005 - 08:55 AM