My sprites are spawning inside of wall can anyone please help?

Can anybody please help me with my code. I have been trying to make a PAC-man Parody, and have struggled to get my sprites to not spawn in walls. The point and sometimes enemies are spawning in a wall. Thank you if you can.

3 Likes

welcome! make sure you share your code so we can tell whats up!

If ur tilemap looks something like this

then use this block:
Screenshot 2025-03-05 180845

I’m sorry, in order to help you, could you share your code, please?
Here’s a quick tutorial:

Pacman parodie

That’s what the project is.

Its using a different style of map to that, its using bitmap instead, and the walls are actual barriers that don’t allow you to pass through

1 Like


Something like this should work! It will also allow your enemies to spawn all over the map instead of just in the top left.

Thank you

1 Like

Also how do i make it so that only one clone gets destroyed?

1 Like


Instead of that use this:

That didn’t work, its still clearing all of the sprites of the same type, is there any way that it can be changed?

You probably have the same bit of code somewhere else. I will take another look….

Ok, so you are using that “destroy all sprites of type…” block in two places:

You need to switch them out for the normal “destroy (sprite)” block, which only destroys a single sprite, instead of a whole bunch.

First, find the correct block in the sprites tab:

Then replace both incorrect blocks with the correct one:

Then drag the correct sprite variables into the sprite spot:

And now it should work!

1 Like