It's not too complicated. I'll make an example later if I have time, but for now I'll try to quickly explain it.
I used this method to create this laser effect
Basically you make a sprite for the laser with a width of one or two pixels (the height can be whatever you want)
Make the object that shoots out the laser.
Calculate the distance in the direction it's facing to a wall using whatever method you want. Collision_line, or do/until loops are probably the best way.
Make as many laser segment objects as necessary to fill the gap between the object and wall. Place them along the intended direction using lengthdir codes. Make sure to give them an initial image_angle of the direction the laser making object is facing. You can do that with this code -
i = 0;
repeat length_until_collision_with_wall
{
laser = instance_create(x+lengthdir_x(i*laser_sprite_width,angle),y+lengthdir_y(i*laser_sprite_width,angle),obj_laser);
laser.image_angle = angle;
i += 1;
};