-
Pacman ghost help
Alright so ive been making a pacman game and have came to doing the ghost. So far I have it were if they collide with a wall they will random generate a number to choose which way to go. The only problem is I need to make it turn with out colliding also. Does anyone have anyidea how to do this.
-
Re: Pacman ghost help
So your problem is that when the ghost hits a wall with the speed of 5px the ghost moves into the wall 5px before it chooses another direction?
-
Re: Pacman ghost help
no sorry i should of been more clear it more of something like this
...............#... #
................#...#
................#...#
......#####....#######
..................g
....... ##############
if g is the ghost and # is the border(ignore the . ) i need to go up the path event thought it never collided but im
-
Re: Pacman ghost help
You could check if there is a wall over the ghost.
If not, it will "random generate a number to choose which way to go".
-
Re: Pacman ghost help
alright thanks i cant believe i didnt notice that earlier