• 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!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Collision Event Limitations

Hi,

can someone please explain to me what the collision event limitations are?

Background information: I have a player object which has a collision event which checks against a bullet object. The player or enemy object is loosing actually health on collision, but I can't destroy the bullet instance with instance_destroy(other). Tried with() context without any result. Somehow show_debug_message() doesn't seem to work either within the collision event.

I'm curious if this is a bug in the current build or I'm lacking some information about this event.
 

P3HWN1E

Member
Hi,

can someone please explain to me what the collision event limitations are?

Background information: I have a player object which has a collision event which checks against a bullet object. The player or enemy object is loosing actually health on collision, but I can't destroy the bullet instance with instance_destroy(other). Tried with() context without any result. Somehow show_debug_message() doesn't seem to work either within the collision event.

I'm curious if this is a bug in the current build or I'm lacking some information about this event.
If you are using "other" within the collision event itself it should refer to the object the calling instance is colliding with, So that should work. What you can do otherwise if you have a parent for the player and other things that can get shot at. is have the bullet look for collisions with the parent and have it delete itself. Even if the bullet deletes itself it should still trigger the collision event of the object the bullet hits.
 
Thanks, it's working now. Must have been some other bug in my code, because your hint was the first thing I did and it didn't work that day.

Case closed. ;)
 
Top