I worked with my class and we created a Pac Man Game and I stepped the class through with the scripting and one student when they play their game the ghost move then line up in a row and don't move any more. I have looked through and as far as i can see everything seems to match up but I am not sure. Here is the link to the project:
http://scratch.mit.edu/projects/arttstone/3229157
Can anyone help?
Offline
I've found a glitch that will take some time to finish: when you get a 'pellet' instead of having a:
change [score v] by (1)it has a:
set [score v] to [1]but I've tried looking for the cause of the glitch stated above and I can't find it either. Good-luck trying to find/fix it.
Offline
liam48D wrote:
You will find it in your pellet section sprite.
when gf clicked show forever if <touching [PacMan] play drum [48] for [0.2] beats set [score] to 1 --- change [score] by 1 hide stop script end end
when gf clicked show forever if <touching [PacMan v]?> play drum [48 v] for [0.2] beats set [score v] to [1]//should be change score by 1 hide stop script end endFixed
Last edited by topazdragonlord (2013-04-04 09:38:40)
Offline
arttstone wrote:
Thank you that helps the score. Any idea why the ghosts are freezing?
Unfortunately None. - But I'll try again to see if I can find out
Last edited by topazdragonlord (2013-04-04 12:59:00)
Offline
I've just spent like 30 minutes and I can't seem to find anything, but I think it has something to do with the movement scripts in the ghosts because there warping around and disappearing. Good-Luck
Offline
Found it! I hope this is it. In the ghost's forever loop there's a bit:
if (direction)=[2] point in direction [90] set x to [-1] * (Ghostspeed)Where it should be
if (direction)=[2] point in direction [90] change x by (Ghostspeed)I hope that fixes it!
Offline
Didn't quite get the if statements right with the scratch blocks, but I hope you can still read it!
Attempt 2:
if <(direction)=[2]> point in direction [90] set x to [-1] * (Ghostspeed) endShould read:
if <(direction)=[2]> point in direction [90] change x by (Ghostspeed) end
Offline
awesome congrats
I checked that bit but didn't really get anywhere - well done!
Offline