F
Freedom2Fight
Guest
Hello everyone.
I was going through the tutorial for making a Breakout game and I figured I could translate the Drag and Drop bits in to GML.
It all works perfectly except for this bit:
The code above is placed in the step event of a ball (obj_Ball). It lets the ball destroy a obj_Brick it collides with. Well, this one destroys every obj_Brick once the ball hits any obj_Brick.
How do write it in a way that the ball only destroys the obj_Brick it collides with?
Thanks in advance.
I was going through the tutorial for making a Breakout game and I figured I could translate the Drag and Drop bits in to GML.
It all works perfectly except for this bit:
Code:
if place_meeting(x,y-1,obj_Brick)
{
move_bounce_all(true)
with(obj_Brick) instance_destroy();
}
How do write it in a way that the ball only destroys the obj_Brick it collides with?
Thanks in advance.