Discuss Scratch

Jackson9050
Scratcher
64 posts

i need help with shop and buy in a clicker

im trying to make clicker game and i want to add a shop and buy thing but i don't know how, can someone help me
LankyBox01
Scratcher
1000+ posts

i need help with shop and buy in a clicker

Sure, create a sprite called “shop_button” and add the following script to it:
when this sprite clicked
broadcast [shop v]

Then create a sprite called “shop” and add the following scripts to it:
when green flag clicked
hide
when I receive [shop v]
show
when I receive [shop_close v]
hide

Then create a sprite called “upgrade01” and add the following scripts to it:
when green flag clicked
set [upgraded v] to [0]
hide
when I receive [shop v]
show
when this sprite clicked
broadcast [shop_close v]
set [upgraded v] to [1]

And then, go to the main clicker sprite (the sprite that you click) and modify it like so:

when this sprite clicked
if <(upgraded) = [1]> then
change [score v] by (1)
else
change [score v] by (2)
end

Now, if you upgrade, you will get twice the points when you click!
webelofox13
New Scratcher
2 posts

i need help with shop and buy in a clicker

I am assuming that you already have a shop in mind with items. You can start with a “go to shop” button:
when this sprite clicked
broadcast [go to shop]
Then to the shop:
when I receive [go to shop]
show
for all of the sprites you want or use:
switch backdrop to [shop backdrop]
Finally for all of the shop items, to subtract from price:
when this sprite clicked
change [total money] by (- whatever value you want)
Show the object clicked on during the main game play, do:
go to x: (wherever) y: (wherever)
set size to (whatever size) %
create clone of [myself]
hide
broadcast [back to game]
And finally for everything during the main gameplay:

when I receive [back to game]
hide
and/or
switch backdrop to [game backdrop]
Jackson9050
Scratcher
64 posts

i need help with shop and buy in a clicker

okay, thanks!

Powered by DjangoBB