R
RobotoSkunk
Guest
Hello, I try to create a beam that suits all types of surface in Game Maker Studio 2, so far I have the following code:
The problem with this is that the laser does not decrease its length when an object is superimposed on the laser. (Sorry if I have grammatical errors, I don't speak English)
Code:
while(!collision_line(x, y, x+lengthdir_x(long, image_angle), y+lengthdir_y(long, image_angle), obj_block, 1, 0)){
long++;
if (long > room_width+room_height) then break;
}