After more tweaking, I discovered some... issues with guided beams.
For the example mod I posted, I overlooked that missileSpeed of 100 and lifetime of 1 means AI will only shoot at targets up to range 2, meaning it will almost never shoot at all! That can be fixed by putting range into missileSpeed and adjusting the OnFireWeapon event to account for that. AI will still aim badly (if no further corrective code is added) because it assumes relativistic shot, but at least it will shoot.
Aside from the above...
If guided beam has same missile speed as normal beams, then for it to have decent range, it needs to fire the beam for many frames, and for such a weapon to balanced, it needs a long fireRate. Swapping to a weapon that fires much slower than once every two seconds is painful to use as a primary weapon because as soon as the player switches to the weapon, he needs to wait as long as the reload delay before he can fire. It is less problematic as a launcher (and I may add a few mod ammoless launchers that shoot guided beams.)
Also, omnidirectional beam that fires for many frames should update aim so that much of the beam does not miss a moving target. Updating aim during a burst requires custom code.
Finally, if player wants such a weapon to fire continuously as long as the fire button is held, then when the weapon was last fired needs to be tracked somehow. (For that, I probably would use charges to store (unvGetTick), and that makes things a bit more messy.)
Download and Play in 1.8 Beta...
Drake Technologies (Alpha)
: More hardware for combat in parts 1 and 2!
Godmode v3 (WIP):
Dev/cheat tool compatible with D&O parts 1 or 2.
Download and Play in 1.7...
Star Castle Arcade
: Relive classic arcade gaming in a new Transcendence adventure!
Playership Drones v7 (Beta)
: (OUTDATED!) Acquire and command almost any ship in Stars of the Pilgrim or Eternity Port.
Work in progress... Playership Drones v8: On hiatus!