Pages: 1
Topic closed
Hi fellow Scratchers,
I am attempting to make my own Pacman game. I am relatively new to Scratch but so far i have been doing well. But now I am trying to program a Ghost sprite to track down the pacman.
I started by plotting a course for Ghost to follow, encountered issues with paths crossing and where to start and loop the Ghost....also the path is not random either so its not really the idea.
Then I tried making a follow command for the ghost. The trouble I encountered here was the turning of the ghost...so i altered and fandangled costumes and used operator controls plotting turn points but....still the ghost would turn at funny angles and get stuck on walls because it was programmed to point towards Pacman.
so what should i do now?
Offline
This is a very complex project... probably beyond my knowledge...
All I can say is check out other already-made pacman projects. This is a well made project that you might want to download and see how it's done.
Offline
It would be easiest to make it either two player or make it not need to follow the pac-man.
If it is two-player just copy the pac-man's moving scripts.
I recommend making the ghost not follow the pac-man.
This would be better with multiple ghosts so just copy the scripts to them.
First put almost invisible dots at all the turning points.
Then
when gf clicked forever if <not <touching color [#00FF00]?>> move (2) steps else set (var) to (pick random (1) to (4)) if <(var) = (1)> turn cw (90) degrees end if <(var) = (2)> turn cw (180) degrees end if <(var) = (3)> turn cw (-90) degrees end if <(var) = (4)> turn cw (0) degrees wait (0.1) secs endTell me if there are any problems.
Offline
Topic closed
Pages: 1