Author Topic: bullets going through blocks.  (Read 2015 times)

ratherz

  • Trial Wannabe
  • Posts: 3
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 35.0.1916.114 Chrome 35.0.1916.114
    • View Profile
bullets going through blocks.
« 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.

Kyir

  • The Kid
  • Posts: 293
  • Normal Guy
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 35.0.1916.114 Chrome 35.0.1916.114
    • View Profile
  • Playstyle: Keyboard
Re: bullets going through blocks.
« Reply #1 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.

ratherz

  • Trial Wannabe
  • Posts: 3
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 35.0.1916.114 Chrome 35.0.1916.114
    • View Profile
Re: bullets going through blocks.
« Reply #2 on: June 02, 2014, 08:54:13 PM »
I thought that would work too, but it doesn't. :(

ratherz

  • Trial Wannabe
  • Posts: 3
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 35.0.1916.114 Chrome 35.0.1916.114
    • View Profile
Re: bullets going through blocks.
« Reply #3 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

lemonxreaper

  • Administrator
  • Spike Dodger
  • Posts: 222
  • Do you even needle?
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 29.0 Firefox 29.0
    • View Profile
Re: bullets going through blocks.
« Reply #4 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.
Just pretend I have a cool picture like Zero.
Completed Fangames: https://dl.dropboxusercontent.com/u/4678222/Complete%20Fangames.txt