 Hello guys, welcome back to episode three of the idle game tutorial series today. We are going to be Doing some more stuff with the upgrades. All right So what basically we don't need to do anything on here for now we're going to jump back to our code and Something I forgot to mention is that we forgot to change this We forgot to change this click value right here. So we're gonna add a new text for episode one called click value text Click value text basically this will update this right here depending on how much you get per click So we'll add it to the list of texts do add the text attributes So this is called click we'll make a new line and It's plus There's no space so we can leave that like as it as it is plus Coins click value plus Coin coins That's pretty much it. So now this will update whenever you buy that or updates every frame So next what we're gonna do we're gonna make more upgrades So let's start a new episode three You can don't have to put these these are just comments to like separate and stuff So we're gonna make another coin upgrade because I feel like these ones are really boring like they don't really do much So what we're gonna do is copy from the last click upgrade Rename them to click up read to click up read to and This time we're gonna add another double this one's gonna be called power So now we got three variables We need to go to our buttons and in order to actually make it do something We have to make a new function or a new method So we're gonna copy and paste this So now we have a second click upgrade button Rename all these variables to whatever you set it to Put twos and all mines and we're pretty much good to go. That's Pretty much it except for the coins click value now. I'm gonna make this cost more a little higher just so it gets more expensive faster and For the coins click value I want this to want to give five every time you buy so this time we're actually gonna do plus five That's pretty simple. All right. We just changed the plus plus two plus equals five. So instead of giving one It gets fives. So this is exactly the same as this These are exactly the same thing. This is just short So, um, okay, so we got this now Let's see now we actually need new text don't forget about that so we're gonna copy paste the click upgrade one text name it click upgrade text to and We're gonna copy this one again because it's easy We're gonna name it click upgrade to We're gonna rename these to To all right. So now this is where it gets a little different. So this too as well right here We're gonna break this off right here where the one is. All right, so we're gonna add a plus This is actually never mind this is actually plus five and never mind never mind You know what I said, this is plus five. All right, that's pretty much it for that If you guys wanted to React do we need to click power now that I think about it. No, we don't need this Not that I think about it. We don't need it Once we add a prestige system, I'm gonna add it which will be in the future. So now this one will be five So let's test it We're gonna go to our game manager We're gonna drag the click value text, which is inside the click button Drag that and we need to make a new click upgrade. We're gonna copy and paste that Change it to two. All right. We're gonna space this out So now we got our second upgrade just change that to two And then we'll drag the second text to here and since we made a new method We need to go to our button and we need to change it to by click copy to Shouldn't you guys should be getting a little familiar with this now If I'm sounding kind of vague then just go to the first episode and I should be explaining things better All right, so we're running it and now our text change. So let's try it So the cost is actually zero coins for now. Why is that? It's still okay, it's still taken away. So the cost is still the same. This is actually zero. So All right, so back to our code We need to make the cost set as default to let's say a hundred and I Made I accidentally made both of these costs to don't do that I don't know why I did that, but that's not what it's supposed to look like. So now it should work All right Yep, I forgot to change this again. It's silly me Basically what happened is that it set cost one or upgrade cost one to ten and then changed to hundred That's why I display is a hundred if you saw that So now it's display a hundred and ten. Yes, it does. So let's buy some stuff save up So now we're making three coins per click We're gonna buy that and now we're making eight. Whoa, so that's the basics of adding more upgrades The production is exactly the same thing Except we might need to add a power eventually so what we're gonna do is debating if I should start So see we'll do another we'll do another one of these So this time we're gonna add the power just so I can show you an example. So we're gonna copy and paste these Change to change to copy paste this rename it to power or whatever you want. That's what I'm doing Okay, so the cost needs a default. We're gonna make this 250. Why not? So Since we're just gonna start down the list, I'm gonna take this upgrade text and I'm gonna paste it again Rename everything to what it should be. Oh And also since we have a power, we're gonna make this produce five per second. So we're gonna set this to five and Coins per seconds will be producing From two different upgrades, so we're gonna add this to the power So it's really easy instead of doing level times five We're just gonna make a whole separate power variable and do it from there and So You can simply do five like this But since I made a power variable I want to show you that you can do plus The power variable plus that it will do the exact same thing except whenever this variable changes the text changes We're gonna set that to two All right, so this text doesn't exist because we haven't created it yet. So let's create that real quick Production upgrade to there you go. So now that's not right. So we're gonna make another by function, which is basically just It's the same thing as before we're not changing anything early Except we're changing the names. So that's done it over with we basically just change all the variable names from once to twos Just so we don't actually upgrade or take away from another upgrade We will always want to make sure all these variables are not the same as these ones Almost they're meant to be changing each other, which I've done before but you guys shouldn't really need to worry about that now and Then it would work successfully because if you change if you accidentally subtract or multiply this cost instead of this one This one will just randomly grow whenever you buy this one, which would not make any sense All right, so we're done with that we can make our second production upgrade So like usual, we're gonna change the The method to upgrade to and I'm going fast. You guys can always just go back I'm sure you guys have watched YouTube before So, okay, we have our next upgrade. We're gonna go to game manager and add our production upgrade text There you go. I'm gonna play Make sure you save hide and save All right, so we're gonna give us a shot. Oh Also something I forgot to tell you is that If this since this is already set to five it's automatically gonna be producing So we want to make sure since powers a constant variable. We actually need a we actually need a time to spy the level So there you go. So since level be zero it would be producing zero If it was one it would be producing five two than ten and so on But the reason why we want to create power variables is because if we have a multiplier like for for example Like a rebirth or prestige system that multiply by two. We can easily just go into here and Just do prestige value, which might be two. It just makes everything a lot easier and And why why not just make this say five? Well, we don't know what this belongs to maybe It's always good to make variables Sometimes it's unnecessary. All right, so we should be good to go now This should be automatically creating five per second, so the cost is zero. Why is it zero? Because we accidentally set the first one to 250 again. I did that Just because I'm recording a YouTube and I try to go as fast as possible. So I miss some stuff But it's all right. We all make mistakes. So now this is stage 25 250. Yep. All right, let's get to that So let's buy some click upgrades All right, there you go. We got five for seconds. There you go And we can buy some of these you can buy one of those By one of those we can have a jelly time We got lots of work It's just saying we got lots more to do because this is not fun. This is very boring Let's take this could take me at least like a minute to make Now not a minute that's possible, but it would take me a few minutes. All right, so we have our upgrades done So this is another really short episode Basically next one I'm going to do I'm gonna do Exponents what should be really easy you basically just gotta look at what I do and just replace variables and stuff But you'll see that in an episode. Anyways, thanks for watching. I'll see you guys in episode four. Peace Yeah Got me in this party all up in a zone How these biddies trying to take away my cell phone like coming party I've been trying to shake you off my mind, but just can't get you off me keep it moving They ain't worth it. Yeah, that's what my father taught me Now I'm going through the motions of letting go my mind's telling me yes, but my heart really don't know your heart When I got to know it yet. I still see a glow. So we had the hottest love. Why'd you leave me in the