- Home /
How to make a shop system?
Hey guys, newbie here. I'm currently trying to make a 2d side scrolling game where there's a play button and a shop button. In a shop button, i would like to have Three characters that have their corresponding equip button. and when i push the equip button. it will change the character in the game? and also i have three weapons that will be equip in the character when equip button is pressed, i dont know what to do and have been watching tutorials, honestly i don't know where to start. if you could HELP me out with this please.
I've seen some answers that i can just hide/unhide them during gameplay. But i really dont know how to do it.
I have already made the Five Levels and I have a default character and a child weapon attached to it. I just want to know how to change them using the Shop $$anonymous$$enu.
Some more detail is needed or you can send the project and I will do it for you.
Perhaps a picture of how you want the shop screen to look with some details of how it works.
How do the different weapons change the character? Do they need totally new character animation sets for each weapon because it's all pixel art, or is it some kind of bone system with the weapon attached at a point? Or???
shop screen is pretty simple and basic. i just put images of the item(weapon/character) then i will be putting two buttons below each images. buy and equip button.
my characters doesnt have animations yet. and my enemies are still prototypes. meaning they are not yet drawn. how can i send you my project? so you'll have an idea of what im trying to say.
I sent you a private message, go to forums and look at conversations
Answer by Mark Gossage · Jun 27, 2015 at 03:20 AM
This is your first game, DONT DO THIS. Go watch http://unity3d.com/learn/tutorials/modules/beginner/your-first-game then come back.
Your main menu is a unity scene. It has a button which loads the game play scene. Build your game play scene, get it so its playable, fun and nicely polished. Once its FINISHED you should have a much better understanding of how to build a game and then you will be ready to work on the shop/inventory system. In fact, the chances are that your game could be publishable without needing the inventory system. Most side scrollers didn't need inventory systems (Mario).
Get your basic game up first. Learn to build games. Save this complexity for your second game.
Answer by Morgrhim · Jun 27, 2015 at 04:05 PM
For the shop system, you'll need to make some fairly large design decisions before you even begin looking at how to implement it:
How many currencies will be involved?
Will you have items presorted, or will the player have sorting options.
To extend the above, can the player hide things they can't afford or aren't eligible to buy?
Will items be in one large store window, or separated into categories?
If the items will be in categories, how will those be presented? In separate tabs? In a category list? In mini-inventories in one window?
After you figure all of this out, you need to look at creating a base shop class that other shops around your game can be derived from, all following the same template, and extend from there.
The weapon issue I'm not sure on, as I haven't begun messing with that kind of system yet.
A diablo shop system is very different from a counter strike shop system, so its very difficult to get a generic solution.
I have just been looking at the game I played last week http://www.kongregate.com/games/EntForge/bear-in-super-action-adventure its not unity, but it a simple example.
What that has is:
Stage select & upgrade screen
Gameplay screen
a way to share money/upgrades across screens (Static variables)
Cash pickups
Using cash to buy upgrades
a way to save money/upgrades between games (PlayerPrefs)
To build something like that would not be too challenging. You just need to break it down. But other types of shop (eg Diablo) will be a lot more complex.
Answer by azgrimm · Jun 28, 2015 at 12:07 PM
I think that the idea of replacing your weapon model in this fashion might be a bit of a challenge for someone who has just picked up unity. I would instead suggest you simply change the weapon's texture instead. it's a bit easier, and you wouldn't have to worry about reattaching each object.
e.g.
starting weapon is a wood sword upgrade to steel
Answer by Katsa09 · Feb 07, 2019 at 05:52 PM
As they said, this can get very complicated very quickly, and it will depend on the factors Morgrhim listed.
That being said, if you want to get some ideas from a long-winded example looking specifically at weapons, you could check out an official Unity example here.
https://www.youtube.com/watch?v=n1YigY3IaE0
But I suspect it will only get you part of the way toward what you're looking for.
Answer by entrepsofttechnology · Feb 22, 2021 at 01:49 PM
https://youtu.be/45tDF1znyY4 It is very useful method .I suggest you use
Your answer
Follow this Question
Related Questions
Weapon system with a class 1 Answer
Animating different Weapons 2 Answers
Replacing Weapon 2D Shooter Unity 1 Answer
Need help with coding a Weapon class generation and Weapon Stats code. 0 Answers
Weapons that used to work got broken after update - has StopAllCoroutines() stopped working? 0 Answers