Sign In Register

How can we help you today?

Start a new topic
Answered

Global Teams and Leaderboard SUM

HI,


I'm quite new to GameSparks so I apologize if I'm asking a dumb question here, but I cant seem to find anything in the forums or documentation that explains how to go about what I want to do.


I'm trying to set up a two team system where the user chooses either TeamA or TeamB when they first log in. When the user submits a score at the end of a level, I want their score to be submitted to the regular score leaderboard, which I get how to do, but I also want to have a total Sum of all scores submitted for TeamA and TeamB so I can show the user a simple TeamA vs TeamB scoreboard in the main menu.


I get that I can create teams and have users join or create a team of the types that I define, then the team leaderboard can show the total score for the team. What I don't get is how to make a global team that doesn't require a single user to create and own the team? I don't want teams to be owned by individual users at all, I just want the two global teams that each user can join so that I can record the total score for each of those teams.


I was thinking that a simpler way to control this would be to just have two events, SubmitScoreTeamA and SubmitScoreTeamB, Then have three leaderboards, one that listens to both events and records the scores as maximums, which would be my standard high score Leaderboard. Then have a separate leaderboard for each event that sums the values received. What I don't get in this situation is how to then just grab the total value of ALL scores submitted to these two leaderboards. While trying to set this up, all I can get is the ranking of players based on their individual score sum, rather than just the total value of all scores submitted to this leaderboard.


Am I going about this the wrong way?  Maybe I should just set up the standard team system, use two default accounts held by the company to make a TeamA and TeamB with unlimited users and then make every user just join one of those two teams. My only problem with doing it this way is that it just seems a little hacky.


I feel like what I'm trying to do isn't that complicated so I'm sure there is a simple solution. Any help or a direction would be great, thank you.


Best Answer

Hi Tim,


You should be able to achieve this with a single event and a custom running total for the teams. I'll go through a simple configuration below. It will track the MAX score on the global individual leaderboard and then SUM all of the scores from team mates on a team leaderboard. First you can set up the event like below. It's simply going to have a score attribute and we'll be tracking the maximum score. This will be used on our Global Leaderboard.


image


Next we'll create our team running total. You can see how I configured it below. Important things to note here. For the event we are using the "scoreA" event which we have just configured. I'm also using my "lb_team" type but feel free to change this to a configured team type in your game. Next we're setting the calculation type to "SUM". This will add all of the entries together for each team member.


image


Now we'll configure our leaderboards. We'll start with the Global One as it's quite simple. You can set it up like below. Feel free to call it whatever you feel is suitable.


image


Now lets set up the team leaderboard. Important to note that we are using the "lb_team" type here and the runing total is set to the custom one that we created above.


image


This should now be ready to test. Create two teams, one called "Team_A" and one called "Team_B". Now post some scores. I had the player in "Team_A" post 50 twice. This meant they had a score of 50 on the global leaderboard but the team leaderboard contained an entry for 100 from "Team_A". I did the same for the player in "Team_B" but posted 70 to  achieve a similar result.


My Global Leaderboard looked like this.


image


My Team leaderboard looked like this.


image


This was all accomplished with a single score event ("scoreA"). Try that and let me know if thats what you need here.


Regards,

Liam


1 Comment

Answer

Hi Tim,


You should be able to achieve this with a single event and a custom running total for the teams. I'll go through a simple configuration below. It will track the MAX score on the global individual leaderboard and then SUM all of the scores from team mates on a team leaderboard. First you can set up the event like below. It's simply going to have a score attribute and we'll be tracking the maximum score. This will be used on our Global Leaderboard.


image


Next we'll create our team running total. You can see how I configured it below. Important things to note here. For the event we are using the "scoreA" event which we have just configured. I'm also using my "lb_team" type but feel free to change this to a configured team type in your game. Next we're setting the calculation type to "SUM". This will add all of the entries together for each team member.


image


Now we'll configure our leaderboards. We'll start with the Global One as it's quite simple. You can set it up like below. Feel free to call it whatever you feel is suitable.


image


Now lets set up the team leaderboard. Important to note that we are using the "lb_team" type here and the runing total is set to the custom one that we created above.


image


This should now be ready to test. Create two teams, one called "Team_A" and one called "Team_B". Now post some scores. I had the player in "Team_A" post 50 twice. This meant they had a score of 50 on the global leaderboard but the team leaderboard contained an entry for 100 from "Team_A". I did the same for the player in "Team_B" but posted 70 to  achieve a similar result.


My Global Leaderboard looked like this.


image


My Team leaderboard looked like this.


image


This was all accomplished with a single score event ("scoreA"). Try that and let me know if thats what you need here.


Regards,

Liam


Login to post a comment