Tilemap glitch where it freezes mid way

Hi! I have found this forum so helpful and I’m very grateful.
I am stuck on this game. Once the end of the third tilemap is reached, the game just freezes. Why?

Less significant, but still a glitch, is the projectiles on tilemap lv 2. They appear randomly after the enemy is destroyed. Is there a way to turn them off?

I’m still working on it

1 Like



The problem is this:

After mySprite2 is destroyed, the sprite variable mySprite2 doesn’t exist anymore.
So if mySprite2 doesn’t exist, the [set (projectile) follow (mySprite2) with speed (100)] block doesn’t work because mySprite2 doesn’t exist.

Here is the fixed one:

1 Like

Cheers for that support.
The projectile bug makes sense now.
However, the freeze still happens at this point.

Thanks for the ideas mate!
I took inspiration from them and got the code to work without the custom function that caused the bug. It wasn’t really needed anyway.