I would try using the bullet behavior. Shoot a bullet from the turret, use instant hit. Upon hitting a wall, set the x/y coordinates to private variables in the laser. Then then set the length of the laser by geting the distance from the laser's point of origin to the xy you set earlier.
Admittedly, I haven't tried this, but it should work in theory.