Formulae/quotes

From Starsonata Wiki
Revision as of 21:34, 19 September 2010 by Simon (talk | contribs) (New page: ===Laser Mechanics=== JeffL Laser weapons and projectile weapons are both derived from the generic Weapon class, and each sort has it's own Fire() function and functionality, though many ...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Laser Mechanics

JeffL

Laser weapons and projectile weapons are both derived from the generic Weapon class, and each sort has it's own Fire() function and functionality, though many stats, like damage, range, etc, are commonly inherited from Weapon.

After basic checks, like energy, PvP ranges, etc, the laser fire function uses the collision code to trace the route of of the laser to what it would hit, aiming as far towards the selected target as possible, and calculates an impact point. It then does damage, tweaks, etc, and then adds an effect object to the galaxy to show where the laser was, slightly randomizing the end point. That effect stays for a little while and automatically deletes itself after its lifetime expires.