Something i have been working on related to my main game - just thought i wanted to share it with people.
It features a single shot laser attack and a continous beam attack - Player sprite that sticks to the mouse cursor and a target sprite that moves randomly using sine
-----------------------------------------------------------------------------------------------------------------------------
Capx file is here - if anyone wanna improve on it or simply just want it.
Laser and Beam
-----------------------------------------------------------------------------------------------------------------------------
SingleLaser
It has a internal cooldown of 0.5 sec (can be changed, lower/higher)
it sets the angle towards it target once, from the player to its target. (To make it more realistic)
It has a max range before it fades. (because thats what lasers do)
Can only be fired when player has line of sight, to its target. (can be changed, lower/higher)
It have a natural speed in which it "travels" (can be changed, slower/faster)
BeamLaser
It fires a continous beam towards its target. That fades in
It can only fire when the player has line of sight to the target. Or holding down left mouse.
Continues to set its angle towards its target.
----------------------------------------------------------------------
— - maybe something you could use?
----------------------------------------------------------------------