R
Retro_Dude
Guest
I'm fiddling with a Pac-man-esque game, and I got the "ghosts" wandering around the maze in a random fashion simply by checking if they hit a wall, and if they do, they randomly choose to go up, down, left or right and align to the grid. No problems at all.
But, when I introduced directional change to the animation I ran into trouble. I'm changing the direction of the animation by having an event set at "Begin step" and then executing this code: image_angle = direction+360. What happens is that the "ghosts" get missaligned and rotates until they find a way back to the grid, IF they find a way back to the grid. Any thoughts?
But, when I introduced directional change to the animation I ran into trouble. I'm changing the direction of the animation by having an event set at "Begin step" and then executing this code: image_angle = direction+360. What happens is that the "ghosts" get missaligned and rotates until they find a way back to the grid, IF they find a way back to the grid. Any thoughts?