Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » how to make a clicking game
- boggo123
-
5 posts
how to make a clicking game
The Basics
(check out mah game http://scratch.mit.edu/projects/25549292/#player )
to make a clicker:
get the sprite you want to click on
now make a variable with the name of what the think is (e.g gems, moneys, cookies)
now code inside it:
When this sprite clicked
change (your variable) by 1
OPTIONAL: Play sound pop until done
Making a Shop
OK, now, make a new sprite and make it a square with shop written inside it
make a backdrop, name it shop
now code inside the shop button:
When this sprite clicked
broadcast (your broadcast)
hide
when i receive (your broadcast)
switch backdrop to shop
now, at the clicking sprite
when i recieve (your broadcast)
hide
Exiting the shop
ok, make a sprite that looks like a x button
code it when i recieve (your broadcast)
show
(make it be up at the corner)
when this sprite clicked
broadcast exiting shop
hide
that means it will broadcast to the shop button and clicking sprite to show if you code the following on both sprites:
when i receive exiting shop
show
Making some shop items
So, this is the
final part
depending on your game, make a sprite to fit the thing that would make whatever your clicking
now make a var
(the name of your thing)
coding time
when i receive (your broadcast
show
when i recieve exiting shop
hide
when this sprite clicked
if example > (1 off the price of yourchoice example 19) then
change example by -20
change (the name of your things var) by 1
forever
wait (your choice of time)
change example by (the name of your things var
every time it waits as long as you code it to, it generates 1 example, and goes up if you buy more
hope this helps you!
(check out mah game http://scratch.mit.edu/projects/25549292/#player )
to make a clicker:
get the sprite you want to click on
now make a variable with the name of what the think is (e.g gems, moneys, cookies)
now code inside it:
When this sprite clicked
change (your variable) by 1
OPTIONAL: Play sound pop until done
Making a Shop
OK, now, make a new sprite and make it a square with shop written inside it
make a backdrop, name it shop
now code inside the shop button:
When this sprite clicked
broadcast (your broadcast)
hide
when i receive (your broadcast)
switch backdrop to shop
now, at the clicking sprite
when i recieve (your broadcast)
hide
Exiting the shop
ok, make a sprite that looks like a x button
code it when i recieve (your broadcast)
show
(make it be up at the corner)
when this sprite clicked
broadcast exiting shop
hide
that means it will broadcast to the shop button and clicking sprite to show if you code the following on both sprites:
when i receive exiting shop
show
Making some shop items
So, this is the
final part
depending on your game, make a sprite to fit the thing that would make whatever your clicking
now make a var
(the name of your thing)
coding time
when i receive (your broadcast
show
when i recieve exiting shop
hide
when this sprite clicked
if example > (1 off the price of yourchoice example 19) then
change example by -20
change (the name of your things var) by 1
forever
wait (your choice of time)
change example by (the name of your things var
every time it waits as long as you code it to, it generates 1 example, and goes up if you buy more
hope this helps you!
- epicsandwich123
-
100+ posts
how to make a clicking game
cool, perhaps make it scratch blocks?
- reynwaters54
-
18 posts
how to make a clicking game
i tried to make a block, but i messed up




- cs395875
-
100+ posts
how to make a clicking game
Hi, please stop blockspamming.Not messed up!!!
Thanks!
- xXEvelynXx
-
1 post
how to make a clicking game
is there any way that I can have the price of something in shop increase every time I purchase it? That would be good because then I would have to get money to make more money to get money blah blah anyways how do I do that? (show in blocks if you can tnx!)
- deck26
-
1000+ posts
how to make a clicking game
Please create your own topic rather than necroposting. is there any way that I can have the price of something in shop increase every time I purchase it? That would be good because then I would have to get money to make more money to get money blah blah anyways how do I do that? (show in blocks if you can tnx!)
- Mapper-from-Canada
-
12 posts
how to make a clicking game
I agree, reporting to be closed.Please create your own topic rather than necroposting. is there any way that I can have the price of something in shop increase every time I purchase it? That would be good because then I would have to get money to make more money to get money blah blah anyways how do I do that? (show in blocks if you can tnx!)
- Discussion Forums
- » Help with Scripts
-
» how to make a clicking game