- Home /
In-Game Currency Generation for Teams
The title is kind of ambiguous but I don't know how else to phrase this. Basically, I am generating some currency that will be shared among teams.
There will be 2 teams and each team will have a pool of currency that they can use. I am just wondering how to separate these 2 pools.
Answer by IvovdMarel · Aug 03, 2018 at 03:35 AM
This question is still very vague, but let's see where this gets you. To store a currency, you just create an int.
int currency = 0;
To create multiple currencies for 2 (or more) teams, you should create an array.
int[] currencies = new int[2];
Then each team will access it by using their 'identifier', which is 0 or 1, depending on the team. (or 2,3,4 etc if you have more teams).
int team = 0;
int myTeamCurrency = currencies[team];
So each $$anonymous$$m should have their own currency variables? I think this is what I was more confused about. Also how would this work when you run it on multiplayer?
Your answer
Follow this Question
Related Questions
How I share data with unity-teams 0 Answers
Unity took me money 0 Answers
how to make a shop system 1 Answer
How to create a shop system? 0 Answers