Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Making pellets for pacman game with cloner.
- CAA14
-
500+ posts
Making pellets for pacman game with cloner.
Hi,
I'm wondering how i can make all those pellets form just one, and have them offset on only certain spots on the screen. (i.e. not create clones on the walls and outside the maze…)
I'm wondering how i can make all those pellets form just one, and have them offset on only certain spots on the screen. (i.e. not create clones on the walls and outside the maze…)
Last edited by CAA14 (Feb. 1, 2013 17:26:38)
- MoreGamesNow
-
100+ posts
Making pellets for pacman game with cloner.
I haven't had much of a chance to experiment with cloning in Scratch 2.0, but this is what I'd do:
Have a list of all the positions in which dots are supposed to spawn. Then:
when gf clicked
set (i v) to (0)
set (next v) to (1)
repeat (240)
wait until <(next) = (1)>
change (i v) by (1)
set (next v) to (0)
create clone of
end
clone startup
go to x:(item (i) of (dotx v)) y:(item (i) of (doty v))
show
set (next v) to (1)
wait until <touching (pacman v)
hide
change (points v) by (10)
Have a list of all the positions in which dots are supposed to spawn. Then:
when gf clicked
set (i v) to (0)
set (next v) to (1)
repeat (240)
wait until <(next) = (1)>
change (i v) by (1)
set (next v) to (0)
create clone of
end
clone startup
go to x:(item (i) of (dotx v)) y:(item (i) of (doty v))
show
set (next v) to (1)
wait until <touching (pacman v)
hide
change (points v) by (10)
Last edited by MoreGamesNow (Feb. 2, 2013 21:43:52)
- ErnieParke
-
1000+ posts
Making pellets for pacman game with cloner.
The “next” variable is really unnecessary. The script will still work if you take it out and turn it into the above because as I've found out by my Sandbox Test project, when a clone is created, its scripts start up automatically and doesn't wait till the next screen refresh. This also means that (i) will be the correct value for each and every clone. I haven't had much of a chance to experiment with cloning in Scratch 2.0, but this is what I'd do:
Have a list of all the positions in which dots are supposed to spawn. Then:
when gf clicked
set (i v) to (0)
repeat (240)
change (i v) by (1)
create clone of
end
clone startup
go to x:(item (i) of (dotx v)) y:(item (i) of (doty v))
show
wait until <touching (pacman v)?>
hide
change (points v) by (10)
Last edited by ErnieParke (Feb. 4, 2013 00:59:44)
- MoreGamesNow
-
100+ posts
Making pellets for pacman game with cloner.
The “next” variable is really unnecessary. The script will still work if you take it out and turn it into the above because as I've found out by my Sandbox Test project, when a clone is created, its scripts start up automatically and don't wait till the next screen refresh. This also means that (i) will be the correct value for each and every clone.
Ah, good to know. Thanks

- soupoftomato
-
100+ posts
Making pellets for pacman game with cloner.
You're a brave man making a Pac-Man game
- ErnieParke
-
1000+ posts
Making pellets for pacman game with cloner.
Your welcome!The “next” variable is really unnecessary. The script will still work if you take it out and turn it into the above because as I've found out by my Sandbox Test project, when a clone is created, its scripts start up automatically and don't wait till the next screen refresh. This also means that (i) will be the correct value for each and every clone.
Ah, good to know. Thanks
- CAA14
-
500+ posts
Making pellets for pacman game with cloner.
Hi,
Thanks for responding y'all.
Well, once I finish the project I'm currently on I'm of to making pellets.
I'm just a little confused, but when i start making the project, i will just follow the script word for word.
Thanks for responding y'all.
Well, once I finish the project I'm currently on I'm of to making pellets.

I'm just a little confused, but when i start making the project, i will just follow the script word for word.
- CAA14
-
500+ posts
Making pellets for pacman game with cloner.
You're a brave man making a Pac-Man game
Well, i like and don't like a challenge… at the same time.

- MoreGamesNow
-
100+ posts
Making pellets for pacman game with cloner.
You're a brave man making a Pac-Man game
Well, i like and don't like a challenge… at the same time.
I believe he is referring to the copyright dispute.
- ErnieParke
-
1000+ posts
Making pellets for pacman game with cloner.
Well, basically, once upon a time, a scratcher made a nice Pac-Man game. The problem is that Namco (the creators of Pac-Man) said that it infringed their copyright, so it was taken down. This shows that they have the power to take down any Pac-Man game on the Scratch website, including the two I've made. ?
Last edited by ErnieParke (Feb. 8, 2013 20:14:42)
- CAA14
-
500+ posts
Making pellets for pacman game with cloner.
Oh, okay…Wow….
I thought since it's not for commercial use… Oh well…
I mean, it's totally a great one for primitive A.I. practice…
Well, i guess those folks trying to make a L.O.Z. game will also be busted… I think I'll warn them.
Thanks for the info, my pacman game is off.
I thought since it's not for commercial use… Oh well…
I mean, it's totally a great one for primitive A.I. practice…
Well, i guess those folks trying to make a L.O.Z. game will also be busted… I think I'll warn them.
Thanks for the info, my pacman game is off.

- Lightnin
-
1000+ posts
Making pellets for pacman game with cloner.
Oh, okay…Wow….
I thought since it's not for commercial use… Oh well…
I mean, it's totally a great one for primitive A.I. practice…
Well, i guess those folks trying to make a L.O.Z. game will also be busted… I think I'll warn them.
Thanks for the info, my pacman game is off.
I might add here that while Namco may have the legal right to make us remove some variations of Pac-Man, I don't think this is just or fair. And there may be some cases where the Fair Use clause of copyright law give us legal protection, since Scratch is an educational project.
- BoltBait
-
1000+ posts
Making pellets for pacman game with cloner.
If you're copying an entire work, it's not fair use.
I think this is where people run into trouble.
As far as the exception for educational purposes, I (personally) believe that they were referring to classroom use… not such a public forum as the Internet.
But, I am not a lawyer. So, take my ramblings with a grain of salt.
- CAA14
-
500+ posts
Making pellets for pacman game with cloner.
Hi,
Thanks guys,
I think as long as people aren't using companies copyrighted material in a way that they don't want, then they are fine as long as they're not trying to make money or take over the trademark, but that's just me…
But anyway, my idea was going to be a whopper anyway.
Thanks guys,
I think as long as people aren't using companies copyrighted material in a way that they don't want, then they are fine as long as they're not trying to make money or take over the trademark, but that's just me…
But anyway, my idea was going to be a whopper anyway.

- alexparr
-
58 posts
Making pellets for pacman game with cloner.
hi! im pacmans biggest fan, also flappy birds fan!
check this website out! http://scratch.mit.edu/projects/18613953/
check this website out! http://scratch.mit.edu/projects/18613953/
- Discussion Forums
- » Help with Scripts
-
» Making pellets for pacman game with cloner.