• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML Bullet Collision

C

Captain_ArrowWound

Guest
I am making a game where players and enemies both fire bullets. If they hit a tree, rock or something like that the bullets are destroyed. This takes a while to do because I have to implement it in each object by adding instance_destroy in the object collision event. I'm wondering if there is a easier way for me to do this?
 
D

Danei

Guest
Use a parent object named obj_terrainParent or something, and put your code in that, and make all the objects that you want to behave this way children of that parent object.
 
C

Captain_ArrowWound

Guest
One question though, is there any function that acts as within. Such as if collision with bullet, destroy bullets within a certain range.
 
Top