Help with collisions?

M

McClerkicle

Guest
Ok, so I'm making a breakout clone from scratch as a personal coding exercise.

The problem is, I don't know how to make it so that the ball can bounce off a block, AND destroy it on the same frame. I'll post my code if anybody needs it, but this is actually a recurring problem I've had with collisions whenever I want to do anything complex. For example, I was once trying to make a top-down rpg-type game. At one point, I had to make it so you could only collide with a specific wall under specific circumstances. The problem was, and is now, that place_meeting() does not store the id of the specific instance you're colliding with.

Now, I know this is the type of thing that's really easy with drag-and-drop coding, but I'm sticking with GML so I can develop my coding skills. Any advice?
 
M

McClerkicle

Guest
It worked! I had a feeling there was just some function I hadn't heard of that would do the trick. Thanks for the help!
 

sp202

Member
Alternatively, you could have used instance_destroy in the block's event for collision with the ball.
 
M

McClerkicle

Guest
Ok, now I'm having trouble with a powerup that's supposed to resize the ball. It's resizing the image, but not the mask. What should I do?
 
Top