 Welcome to part 4, let's let's continue with our clicker game. On this video I'm going to show you how to add a different value for each auto clicker, so instead of only adding one to the main as we had it before we're going to be adding different ones and also increasing the prices to each auto clicker. Let's go ahead and start modifying this auto clicker node. Here we had this grid which is it was okay at the time but since we want to add more information now we're gonna have to swap it. So let's go ahead right click on it and change type. I want it to be a control node this would make it more flexible for me to be editing right now. Okay now that we have it as a control node I can move the elements around freely and first thing I'm going to do is to create the new label for the new feature that we're adding. So let's add a label which is going to be the units per second. Okay so this is going to tell us how many units will this upgrade add to your count per second and if you remember here I had the price and the number in the same label which made it very complicated in the script here to update because I had to create a new variable to store like this part of the string and then convert the price add it together set the text I think this could be improved so how do you improve it? I think the easiest way would be to create a new child node which is going to be an horizontal box container and inside that container we can have the value like the text that you want and another label which is going to be the value in this case is going to be one so we only generate one unit per second. Now I can target this node instead of targeting both words and values at the same time. Let's go ahead and on the script create the new variable which is going to be the units per second. Let's export it so we can edit it from the inspector and it's going to be an integer the default value is one that's how many units we're going to be adding to the count if we have this upgrade per second to do that on the timer timeout which is the event that we use to add the values to the main one we need to multiply how many units per seconds we have with the amount that way if we have two of these auto clickers that generate five units per seconds we do five per two equals how much you want to add let's see the units per second around here let's just connect disconnect this amount and in operations math multiply we will multiply how many of these upgrades we have by how many clicks per second they generate so now we can add it to the main count of the program and that should be it let's save it and now another thing we want to edit is on the process tab the same way we here modify the price depending on how many we have let's modify this number so if we set a different unit per second we want to see it was like it on the button let's see what do we need we need the units per second and now we select the value null and we drag the text remember it's an int and a string so we need to convert it string we scroll down here string int so this will convert it it will get a string now we set it here and we continue the program which came here did all this and then it continues here okay let's save it again and now let's go to the main view now everything is a little bit on top of each other so let's add some breathing room okay okay let's add a little bit more so it's clear where each line is okay okay let's set the units per second now we can modify it from here so the first one is gonna be adding you one but the second one is gonna be adding five per second the third one is gonna be adding 10 this one is gonna be adding 50 and this one is gonna be adding 100 the prices are all wrong okay but they are just placeholders then we can do the math and calculate a proper progression let's try it out let's see units per second one five ten okay this seems to be working let's see let's buy the first upgrade this should be generating five instead of one yes it is working so now we have a lot of value okay we can buy this one is generating 10 yes so we have two it's 20 okay okay now let's make the price incremental let's go to the script and i'm going to create a new variable which is going to be the increment and this variable is going to be an integer which will start by two i'm going to multiply the value the current value by this increment so every time that you buy a new upgrade the next one will cost the double let's see on button pressed here's where we buy we check if the price is the correct one and then we add a new amount we update the text and everything now after all this is done i know that i already bought a new upgrade so i'm going to update the price let's see let's control grab the price here and let's multiply some values first of all the amount i want to have i want to know how many we have already second of all is the increment and the third one is going to be the price so to multiply these three values let's create here with operator math multiply first we multiply these two so we know how many times we need to apply increment and then let's add another one which with the result of this increment and the price is going to multiply the price for the last step and update it that way whenever we are buying new upgrades the price is always more expensive let's see let's try it out first upgrade is five let's get to five add a new one the second upgrade is 10 and i cannot buy it you should be disabled until i get to 10 now that is 10 i can buy it okay yeah this seems to be working that way you are forced to always be upgrading the price okay i think we have everything we need for this video and one last thing i wanted to cover i've been working a little bit on the idea of the autoclicker you know everyone has a theme the theme i chose is a necromancer so i made just a very ugly image here that you can see which is a necromancer on a tower i want to have a book here that every time that you click it it goes up and you get more zombies or just skeletons or whatever and the upgrades there so i know you cannot handle how amazing this image is but i asked my brother which is a very very good artist to draw some images and he will be making these prides and i'm gonna be using this theme to finish up this clicker game um so yeah so you get a better picture the layout is gonna be something like this this button is gonna be here here i'm gonna be having that and hopefully with better graphics this will look much prettier um yeah now use it like this is how the game will look like so that's it for today but the next video is going to be me translating the code to regular scripting uh fixing a few bugs that we have here on the number and hopefully adding the sprites that andre will make for this game thank you very much to my patreons and everyone that helped me with this video if you have any questions please leave a comment down below leave a like subscribe and all those things and see you in the next one bye