Spaceship Shooter Coding Help (Collision)

I have a space ship shooter game I’m making here I am wondering if anyone can explain why collision between shot and enemy doesn’t always happen. Thank you.


Hi @soconnor,

There’s a couple of issues with your code:

  1. Events should be outside of loops - event blocks are always listening, ie, forever waiting for an event to happen, even after it’s already happened. Take them out and place them before your forever loop.

  2. Clone events should be placed right after the clone is created - this is so you don’t have an event listening out for an object which doesn’t exist.

Fixing these issues should resolve your problem.

Hope this helps! Let me know if you have any further questions about this. If this solves your problem, please mark this post as the Solution.

Many thanks,
Geoff @ TechLeap


Ok, so I think I understand what you were saying/updated my code all seems to work as intended. Thank you.


Well done @soconnor! By working it out yourself, you’re building your own coding & problem-solving muscles!

1 Like