• 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!

Mac OSX Runner crashes when instance is destroyed in collosion using while (other)

D

Denis Elias

Guest
Hi
I'm new to GML.
What I try to do:
My bullet object is colliding with my enemy and I want to destroy both of them.

So I added an collision event and wrote:
instance_destroy();

while (other)
{
instance_destroy();
}

The runner just stops responding.
When I use collision events in both objects with only instance_destroy(); it works as it should.
Seems that I cannot access the other object with "while"
I think I am doing something wrong here. Can someone help me??

Thanks a lot!
 
You're welcome.

If you didn't already know, you can middle-mouse click on any function in the Editor to open the manual page for that function. If any code is not working how you expect it to, you can quickly check the manual.
 
Top