I Wanna Community

Fangames => Game Design => Programming Questions => Topic started by: ratherz on June 02, 2014, 08:27:39 PM

Title: bullets going through blocks.
Post by: ratherz on June 02, 2014, 08:27:39 PM
As the title states that is my problem. I cannot figure out how to get bullets to stop going through the blocks. It is extremely random as well. Sometimes bullets wont go through, other times they do. It seems when I touch the blocks it fixes the problem. I may be wrong though. This is on lemon's engine.
Title: Re: bullets going through blocks.
Post by: Kyir on June 02, 2014, 08:45:49 PM
Try creating a collision event inside bullets where when it collides with you block object it runs the code instance_destroy()

Other than that, I'm not really sure what you could do.
Title: Re: bullets going through blocks.
Post by: ratherz on June 02, 2014, 08:54:13 PM
I thought that would work too, but it doesn't. :(
Title: Re: bullets going through blocks.
Post by: ratherz on June 02, 2014, 09:00:41 PM
Ok, I figured it out. Apparently, there was a problem with the mask I made for the block; not solid enough I guess. :x
Title: Re: bullets going through blocks.
Post by: lemonxreaper on June 03, 2014, 06:47:17 AM
if there is empty space in the mask the bullets wont collide with it, and with certain h alignments the bullets can pass through since they move over so many pixels every frame.