How To Make A 2D Clicker Game – Unity Tutorial #010 – AUTO SELLING
✦ FREE Assets:
✦ Start your game development career today and learn how to make a game through the power of Unity. Every Unity Tutorial at JV Unity costs NOTHING from you, and any support received through YouTube, Patreon or Facebook is greatly appreciated.
Who Is Jimmy Vegas?
Jimmy Vegas is one of the top YouTube tutorial developers. In depth Unity Tutorials teaching you how to make a game in unity 3d! My unity tutorials include development, programming in C#, coding logic and more. For beginners, it’s easy how to learn unity with tips and tricks you can make a game for FREE. I provide FREE assets for you to use and learn.
Start your game development career today, for free. #UnityTutorial
Thank you 🙂
CAN SOMEONE HELP IM TRYING TO MAKE MORE SHOPS BUT IT JUST TAKES THE VALUES FROM ONE SHOP TO THE OTHER
Can you make an episode for the FPS series , in wich you can show us how to do bosses?
Horror series videos please
i dont know if it was just me but when i reached 0 cookies and then clicked more when i had the auto sell it was not working but it was fine unless i hit 0 cookies
I've been watching your tutorial for like 5 months
hello you could teach how to make a bot with which to compete to find pairs of cards and this bot has intelligence levels from clumsy to ready
memory card game + bot in unity 2d
Mr. Vegas how hard would it be to make a super smash bros type game in unity?
Use the key combination Ctrl+Shift+R while renaming variables. This will let you save time as all names of the original variable will be updated to the new name of the variable.
Auto sell works fine until I buy an auto cookie generator? Then, just the generator works, and the Auto-Selling stops?
Debugging my final version, in 13:25 (video 10) GlobalCookie.CookieCount -=1 is a (little) mistake, since when you have more AutooSell, it aways discount 1 cookie, instead of Number of AutoSell (Shops). To correct this, Just subtract InternalIncrease instead of 1; I hope this helps.
For some reason when I buy the auto cookie it just starts to slowly go to 0 instead of going up in quantity, can anyone help?
Sorry Just correcting ^_^ 12:49 if(GlobalCookies.CookieCount == 0) Should be changed by if(GlobalCookies.CookieCount < InternalIncrease , because when I debug the program and I have 2 shops the cookie will become -1 if I have 1 cookie left and will become -3 and so on.
when i get enough money to get the shop/baker and i buy one of them the other one isnt disabled so you can just buy the other one but itll go into -, anyone else got this problem?
For anyone wondering how to make the auto-sell work even after it hits zero: (Granted you fix the issue with other comments if it goes into negatives)
for the AutoSell.cs, instead of having a comment for //we can't do nothing here, change it so
SellingCookie = false;
This way, every update, this will restart the coroutine so it will try to sell your cookie. Not the most elegant way to do it I'm sure but that's the solution I've found as a beginner. Hope this helps!
You really should've tested out your code instead of assuming it worked, because there were some bugs that came with it. Good series nonetheless!
13:30 Of course the very first time when you decide not to test, it doesn't work properly. XD Eternal lesson to all programmers: Always test, test, test.
When I buy autosell, nothing happens. PLZPLZPLZHELPFAST!!!!!!!!!!!!!!!!!!!!!11
When i have more Shops than AutoCookies the numbers of the Cookies still goes up or atleast doesnt go down. how can i fix this please help.
When I reach $ 50 to buy a shop then the button to buy Baker disappears. What should I do?
I need help, every time I press the shop button it buys the shop but it just keeps infinitely taking cookies away and turning it into cash. If anyone’s got a fix then please do help since I’m a beginner and learning still! Thank you for reading in advance.
If let's say A = 40$ and B = 50$, we have 60$ and I can buy A or B let's say I did buy B, I have 10$ when I buy B but A button is still working?
there are a few bugs the code he makes here is one of the bugs fixed and it is when you buy one of the two autocookie or autosell you can buy the other one for free to fix this bug, in your globalshop and the globalbaker script after the
if (currentCash >= 0) part you add:
hope this helps some of you
I make everything at start = 10dollars when I buy 3third autosell then it goes to negative..
When I reach the required money to buy both of them, both of their buttons are set active…..and after I buy one of them, the other button is still active and if I click on it I get money in – (minus)
… Plz Help!!!
Okay, this is a year late, but whever (I am starting now, great vids for begniers like me ;D)
There is a main problem that allows you to go in the negatives of cookies, due to the autosell selling two when you only have one, skiping the 0 limiter. The way to fix this is by creating a variable that is called "TemporaryInternalIncrease" and making instead of the if statemente saying that if its equal to zero make it "If CookieCount is smaller than Internal" Then make temporaryInternalIncrease be equal to cokkiecount, and replace all the Internal increase into TemporaryInternalIncrease. If you need, I can post the script.
When you buy an auto sell you can buy a baker and go into the negatives to where I got like 50 per sec of both in 10 seconds because I could buy infinite amounts of it
20 years of experience he says
Use the following for 13:30 error
IEnumerator SellTheCookie ()
if (GlobalCookies.CookieCount < InternalIncrease)
SellingCookie = false; // we can't sell Cookies
GlobalCash.CashCount += InternalIncrease;
GlobalCookies.CookieCount -= InternalIncrease;
yield return new WaitForSeconds(1); // 1 second
SellingCookie = false;