GB Studio Currency Counter System Template (999 Max)
This template and tutorial allows you to build your own Currency Counter System in GB Studio for Buying and Selling in game.
The main feature of this template is the Currency Counter on the upper right of the in game screen. The sample shop, buying and selling feature and +1 coin feature (from interacting with the coin) are all extra stuff for you to get the entire feel of this system.
Below are downloadable files that contain the Currency Counter template.
(Made in GB Studio 3.1)
_____________________________________________________________________
WARNING: THE NUMBER OF EVENTS IN THIS SYSTEM ARE A LOT. IT TOOK ME A LONG TIME TO MAKE IT WORK SMOOTHLY. ESPECIALLY SINCE I COULDN'T MAKE A MODULUS FORMULA WORK FOR A 3 DIGIT COUNTER. THE FORMULA FOR 0-99 IS EASY BECAUSE THERE ARE TEMPLATES FOUND ONLINE BUT 3 DIGITS IS A WHOLE OTHER LEVEL IF YOU CAN'T FIGURE OUT A FORMULA.
THEREFORE I MANUALLY CREATED EVENTS FOR THE 3RD DIGITS WHICH STARTED FROM 100 - 999. SO I SUGGEST YOU START YOUR PROJECT WITH THIS TEMPLATE FIRST THEN WORK FROM THERE.
_____________________________________________________________________
Before you begin using this template I would like to give you a few reminders.
1. I highly recommend for you to start your project with this template first then build your game from then on. Because the script 'Player Coin Counter' resets whenever you copy the Event onto another project. Therefore a very tedious process switching all animation states of all digits. (You'll understand once you see the script). You may also just duplicate the sample mart I made and just change the background, the Currency Counter wont be affected. *It is only when you copy the digits actors onto another scene or project messes the animation states up.
2. I made all variables far down the list between Variables 118-125 so it won't affect any of your variables that are near the numbers 1-10 if you do copy the scenes in this template to your projects.
3. Make sure you place the 'Player Coin Counter' Event on "Init" scene, on actor and/or trigger if you want it to update properly as you interact with everything in scene, also - depending on what you want to achieve.
You can't place too many in one list though because the build won't run properly since the currency counter has a lot of topdown events inside.
4. I have tested using the increment variable by 1 adding +1 (coin) to the Currency Counting System from 1-999 and was successful. Also tested going beyond 999 and going below 0 and it's all good.
5. Make sure your animation states for the numbers sprites are adjusted if you do choose to transfer this template to another project. (*The number digits are behind the coin banner if you are wondering where they are during gameworld mode)
(November 12, 2023 Update)
I made the counters appear simultaneously on each 0.1 tick after every interaction.
Thanks for dropping by!
Special Thanks to:
Jan Schneider of Murder Mansion (Assets used for Sample Mart)
Purchase
In order to download this asset pack you must purchase it at or above the minimum price of $2.99 USD. You will get access to the following files:
Comments
Log in with itch.io to leave a comment.
Moving this between games was challenging, but wasn't as bad as I thought it would be.
Knowing to update the number actors was where I got stuck. Updating the number sprite to have the exact animation frames also was key.
Then it was just the long and slow change to each actor in the script.
Your naming made it easy to keep track of though. Thanks for this!
Yes, which is why I usually encourage people to start a project with this one being used first. But of course, if there's already a lot of progress in the game/project, one cannot just restart the whole thing for a currency counter. I'm glad this helped you. It may not be the best but it works and I'm sure people can find ways to tweak it to fit their needs. Glad you were able to make it work :)
Would this work with the Platformer+ Engine?
I would like to say most likely but let me try first then I'll get back to you. Wouldn't want to lie just to make a sale.
Hey! I was looking at your projects! All very creative and cool! Ever considering a Level Up system and all its mechanics? Like if you get a menu up you see the current HP and Lv? ;) Keep the good work! I'll get you a coffee at the end of the month haha
Wow! Thanks for the kind words man. What you mentioned is actually part of my list of systems that I'm planning to make. To be more specific, are you talking about a Status Menu? of Stats? or a UI that pops up when a button is clicked?
And wow thanks in advanced for the "coffee!"
Haha now it will feel like I'm blackmailing your attention with coffee to the status menu idea xD But yeah, the usual suspect: press the start button, a UI is displayed showing your level, money, current HP/Max HP... etc. for top down projects.
haha no it's fine, I was planning to do a status menu anyway it's just a bit tricky because of the number of actors needed for it in one page. For example HP 37/89 at level 6.
The number 3 is one actor, the number 7 is another actor, the number 8 is another and the number 9 is another so that's 4 actors just for the HP. Then another actor for the Level.
So MP, STR, DEF, AGL so on and so forth will need the same and it just wont fit in one scene and it would make everything so slow. So I'm still figuring out how I could do it.
Oh I see. You are right. In my game I'm trying to avoid all of that. You check your status by visiting the doctor (It is a Wrestling RPG so no potions or magic) and he'd give your updated stats. So I'm going for something similar to what ferrethallstudios did only showing current HP and Goals instead of Potions. But I havent figured out yet xD Numbers just dance around. Anyway, keep the good work brother!
Oh okay, so it's a more simple Stats Menu. I'll see what I can come up with. I'll definitely put something up along the lines of anything that shows stats so stay tuned! Thanks for the support again Rod!
To the very first person who purchased this GB Studio Template Counter. Thank you, thank you, thank you. If you have any questions how to run it smoothly. Feel free to comment here or message me on instagram @andraiantonio. I am learning GB Studio daily. I'm not the master of it yet but I will do my best to help you if you have any concerns. Thank you again. You don't know how much it means to me that you purchased my first project. Cheers!