Enemy movement through maze

one of my students is making a pacman game https://makecode.com/_C20Y19c4L1YK
How can we get the ghosts to move around the maze besides the set enemy to follow player block as they always get stuck behind walls?


here is a easy way
use the path finding extention

you will have to create a path from the enemy’s position to the player’s position


Your student can use an extension such as the Tilemap Path Finding ( a* ) (beta) to make the ghost get to pac-man. As far as I know, the green and the pink ghosts chase him in the most direct way, while the cyan one focuses on a point 30 pixels behind pac-man, and the orange one is completely random.


I installed the extension after making the game so it imports the sprites and A nd B commands as well. How do I get rid of the sprites and commands as they do not show up in the code

1 Like

I’m not quite sure what is going on here, but I think I know what the problem is. Did you make sure to import the extension by searching “jwunderl/arcade-tilemap-a-star” in the extensions search bar?

No I found it by searching for the game link

I think the problem is that you used the code for the demo instead of using the extension, am I correct?