Game Development Community

Team Scoreboard

by Stephen · 07/03/2006 (11:23 am) · 11 comments

Download Code File

I have been waiting for someone to release a resource for how to add a scoreboard that displays two teams. With the help from this thread I have got a working scoreboard in TGE 1.4.

First off backup playerList.cs and playerList.gui, now you must have the Team Implementation resource added to your project for this scoreboard to work.


Once you have that resource working in your project,
Copy the playerList.cs to "client/scripts" and playerList.gui to "client/gui".

That's it! Now you have a working Scoreboard that displays two teams.

This is my first resource and I'm still new to scripting, so please be nice.

Enjoy,
Stephen "Tek0"
Tek0 Innovations

#1
05/22/2006 (9:10 pm)
I posted a link back to here from Xavier's team implementation resource. Lots of people over there were asking for it. Thanks for this resource, it's very useful.
#2
05/23/2006 (9:16 pm)
Excellent! Thank you for this, worked first time without a hitch.
#3
05/27/2006 (1:50 pm)
@Midhir
Yeah, thats cool! I have been waiting for a long time for someone else to create a scoreboard that works with that resource. I was tried of waiting, so I decided to create my own team scoreboard.

I'm also currently intergrating your resource with mine, so to have one awesome scoreboard.

@Tim
That's great news! My biggest fear was it not working when you install it.
#4
12/15/2006 (9:54 am)
Works killer, thx Tek0! (TGE 1.5)
#5
12/17/2006 (10:54 am)
Hey, That's cool! I'm glad it works with TGE 1.5
#6
01/08/2008 (10:09 pm)
Awesome, thanks!
#7
01/09/2008 (11:14 pm)
Hey has anybody seen a bug (I think it's in the stock scoreboard, too), where sometimes client's won't show all the players in the scoreboard? I can't seem to find rhyme or reason for it, it just sometimes works and sometimes doesn't, although it always (seems) to work on the server.
#8
01/10/2008 (12:46 am)
Actually, I see the problem, but I've been following this stuff around in circles in Torsion for an hour now, and I'm not sure what to do. It's basically just that in PlayerListGui::update, %team is undefined. How can we extract the team from what is fed to the function?

If I'm not mistaken, this information is only populated once the server executes updateTeam, if that ever happens.

Am I even making any sense?

Edit: found the problem. I simply had to add a field for the teamid to the msgClientJoin messages on Gameconnection::onconnect. Then this stuff worked like a charm.

Took me MUCH longer than necessary because I've discovered that either Torsion or Torque does not rebuild dso's from the common directory automatically.

In the end I learned how Torque uses messages to do this sort of thing, though, which is nice :-)
#9
03/10/2009 (5:27 pm)
Hey Lee (I know this is an older thread) mind telling more exactly what you did?
#10
03/10/2009 (5:38 pm)
@Marcus: I'm afraid that's about as exact as I can describe it without pasting code. Unfortunately both the team resource and tek0's nice addition are only skeletons that need to be fleshed out by you for your game's exact requirements.

As for this specific issue, my suggestion is to be sure you read and understand all the script code involved--then my comment will make perfect sense. You can also see my code by downloading my game (see my profile, game is free). I've included the script source :-) But it's customized for my needs and may not help you as much as you think.

Note: my scoreboard needs to be rewritten, as it depends on client updates for one whole set of scores :-) So definitely don't take it as a model implementation.
#11
10/07/2009 (10:44 pm)
This resource doesn't work, it shows the split for the two teams, and the players show up, but the score is not adjusted at all. Am using stock TGE 1.5.2 and starter.fps. Am I missing something I need to do other than just dropping the files and replacing the old ones? Looked through the files seem pretty similiar.

Thanks