Making pacman in Scratch is tricky, especially because of some of the built-in lag in Scratch. A technique I used once was have a sprite at all the intersections and if a ghost was touching it, it would access a list of all the directions of all the intersections, pick its own intersection, and see which directions were available to it. This is time consuming, especially on Scratch, and you may be able to make sensors to do it for you. I'm interested to see what others come up with.
Offline