ok so right now im a new user but im making a pacman game. Long story short im making solid walls by using
forever if touching color
move -2.1 steps
and he is only moving 2 steps at a time so it makes it s he cant move through the wall.
My question though is the only way i can make the ghost follow me is by doing
forever
point towards pacman
move 1.5 steps
the problem with this is that if i make solid walls for the ghost he will just get stuck on them so im wondering if there is a way to make one sprite follow another while avoiding obstacles a.k.a. solid walls so it will be like a true pacman game
Offline
http://scratch.mit.edu/projects/deatheater/187375 is a demonstration of how to do obstacle avoidance, you may be able to implement it.
That, or you can have the ghosts check if the player is above, below, left, or right of it and then have it move in those directions if it can. You can using sensing to check to see if the ghost can move in a direction or not.
Offline