Cookie Clicker: How to increase balance when tapping

values
howtos

#1

I am going to show you how to make a ‘Cookie Clicker’ typed project. There will be many topics on how to do this, step by step, as making a Cookie Clicker is hard work – or just takes a while. This topic here will be focusing on tapping the cookie (well, I have used a penguin) and increasing the balance/money. This code is quite simple, so you shouldn’t find it to difficult.
You can edit/add more to this code for your likings, as it is always good to play around and learn new things.

  1. Starting off, create a new project, and add a new 'text' object.

  2. Now double tap on that text, or it may already pop up with the 'add text' box. Switch to your emoji keyboard and enter in any emoji you want. This will be the object you tap for the balance to increase.

• If you do not have the emoji keyboard, and do not know how to get it, go here.


3. After you have done that, add a new rule to the emoji object for when the play button is tapped’. Go into the ‘Looks & Sounds’ category and add the ’set size percent’ block. Make the value of the ’set size’ block ’600’.

• This will mean that when the project is started, the object will be 600 in size. You can change the size to what you want.


4. Now it is time to deal with the ’when character is tapped’. Add a new rule to the object for ’When character is tapped’. Once you have done that, Go into the ’Values’ category and add the ’increase value’ block. Now tap in the first box, making sure that you are in the ’iPad’s Values’ section and tap ’new value’.

5. When the ’name value’ box comes up, name it ’Money’, or whatever you want. This will be the value we will use for the balance of the game.

6. Now that value should pop up in the ’iPad’s Values’ section. Drag that over to the first box in the ’increase value’ box. Set the value that ’Money’ increases by to 1, or whatever you feel like setting it to.

• This will mean when you tap the object, it will increase the value ’Money’ by 1 (or whatever you set it to).


7. You can also add your own effects to when the object is tapped such as ’invisibility’. That’s exactly what I’ve done in the photo below, so when you tap then object, the object will flicker to half invisibility to no invisibility. (Goes to 50 then back to 0). This makes the project a little more ’interesting’.

8. Now that the object that we tap is completed, we are now going to add the amount of money we have from tapping the object up above it. This is fairly straight forward but I’ll work you through it.

Start with adding a new text object to the project board, and name it ’Balance’. Then tap ’Add a new rule’


9. Now let’s get into the last part of this project’s code! Start by adding the rule for the text ’balance’ ‘when the play button is pressed. Add the block ’Repeat Forever’ which is under the category ’Control Flow’. Then add the block ’Set Text’, which is under the category ’Looks & Sounds’ into the ’Repeat Forever’ block.

Once you have done that, tap the box in the ’Set Text’ block, and tap the ’Values’ section which is above the calculator. Make sure you are in the ’iPad’s Values’ Section, and then you should see the value ’Money’. Drag this into the first box in the ’Set Text’ block. You can now set the colour of this text as well, but since I have a white background, I have it set to ’Black’.

• What this does is that when the play button is pressed, it will repeat ’Set text to Money’ so that it will stay updated with how much the value ’Money’ is.


10. Yay! If you press ’Play’, when you tap the object (which should be the emoji you chose), the numbers up the top should go up.

You can use this code in many many different types of projects – not just a clicker/tapper project.
Hope this helps!

ColeDJ/BestesColesNZ


#2

I Really like how you explained this! the arrows normally would make it confusing but the way you did was really nice neat readable and organized great job @ColeDJ


#3

k