Discuss Scratch

YakobuYt
Scratcher
15 posts

Help with cookie-clicker game

I am trying to make a cookie clicker game, and I have set up a shop that is functional ( i have only set up cursors for now) , but to make it work where you can have more than one of an item, I have to idividually make a new code for that specific number of items every time. Is there a way that I can make this more simple like if my cursor-ammount variable goes up, then the ammount of automatic cookie-clicks goes up?
Sorry if this is confusing im not really good at explaining stuff.
https://scratch.mit.edu/projects/524809094/
Amazing_script
Scratcher
21 posts

Help with cookie-clicker game

YakobuYt wrote:

I am trying to make a cookie clicker game, and I have set up a shop that is functional ( i have only set up cursors for now) , but to make it work where you can have more than one of an item, I have to idividually make a new code for that specific number of items every time. Is there a way that I can make this more simple like if my cursor-ammount variable goes up, then the ammount of automatic cookie-clicks goes up?
Sorry if this is confusing im not really good at explaining stuff.
https://scratch.mit.edu/projects/524809094/
one tip that I have is doing cloning for that to have fewer sprites. I will remix it and do that.
Amazing_script
Scratcher
21 posts

Help with cookie-clicker game

YakobuYt wrote:

I am trying to make a cookie clicker game, and I have set up a shop that is functional ( i have only set up cursors for now) , but to make it work where you can have more than one of an item, I have to idividually make a new code for that specific number of items every time. Is there a way that I can make this more simple like if my cursor-ammount variable goes up, then the ammount of automatic cookie-clicks goes up?
Sorry if this is confusing im not really good at explaining stuff.
https://scratch.mit.edu/projects/524809094/
I almost have it done but if you have some way to hide or remove clones that would be helpful. here is the link https://scratch.mit.edu/projects/525925919/
dodecahedron07
Scratcher
10 posts

Help with cookie-clicker game

YakobuYt wrote:

I am trying to make a cookie clicker game, and I have set up a shop that is functional ( i have only set up cursors for now) , but to make it work where you can have more than one of an item, I have to idividually make a new code for that specific number of items every time. Is there a way that I can make this more simple like if my cursor-ammount variable goes up, then the ammount of automatic cookie-clicks goes up?
Sorry if this is confusing im not really good at explaining stuff.
https://scratch.mit.edu/projects/524809094/

If you don't have one, create a new variable named “Cookies” to keep track of the cookies.

Now in the “Cursors” sprite if you have one; set up the following scripts below.

whenthisspriteclickedifCookies>9thenchange cursors by1change cookies by-10elsebroadcast sorry

NOTE: In the if / else statement change the 9 to the price minus 1 and change the -10 to the price's negative value.
Meanwhile in the Cookie sprite ( the one that you are clicking):

whenIreceive sorry saySorry, but you cannot afford that.for5secs

Last edited by dodecahedron07 (May 5, 2021 13:10:16)

dodecahedron07
Scratcher
10 posts

Help with cookie-clicker game

If you have trouble with your game check out my cookie clicker for reference.
Amazing_script
Scratcher
21 posts

Help with cookie-clicker game

dodecahedron07 wrote:

YakobuYt wrote:

I am trying to make a cookie clicker game, and I have set up a shop that is functional ( i have only set up cursors for now) , but to make it work where you can have more than one of an item, I have to idividually make a new code for that specific number of items every time. Is there a way that I can make this more simple like if my cursor-ammount variable goes up, then the ammount of automatic cookie-clicks goes up?
Sorry if this is confusing im not really good at explaining stuff.
https://scratch.mit.edu/projects/524809094/

If you don't have one, create a new variable named “Cookies” to keep track of the cookies.

Now in the “Cursors” sprite if you have one; set up the following scripts below.

whenthisspriteclickedifCookies>9thenchange cursors by1change cookies by-10elsebroadcast sorry

NOTE: In the if / else statement change the 9 to the price minus 1 and change the -10 to the price's negative value.
Meanwhile in the Cookie sprite ( the one that you are clicking):

whenIreceive sorry saySorry, but you cannot afford that.for5secs
what he is trying to do is to expand what is in the shop and I have a start on it by using clones but I have a problem with it that is not working at all.

Powered by DjangoBB