Game Development Community

Scoreboard/playerListGui

by Toks · in Torque Game Engine · 07/15/2007 (5:52 am) · 1 replies

Hey everyone,

first of all, thanks for reading. I'm having problems with my playerListGui. i changed it a bit, because my game has two teams and spectators/unassigned players. to cope with that i changed the gui to have three lists, one for team1, one for team2 and one for team3.

then in the functions to manage the lists i added another variable called %list. this is then used to place or remove clients from the proper list. and this %list variable is determined in the messageCallbacks earlier by retrieving the team from the %clientId variable.

i also added a new callback for when a player joins a team. this supports the old team he was in and the team he is joining, so that he can be removed from the list he was on and added to the list he should be on.

all of this works fine, at least server side. when i host my mod multiplayer, the playerListGui works correctly on the machine which is hosting the game. the other client somehow has problems:
if a client joins a team, this is not visible, all clients remain in the unassigned list, also the score is not being updated, unless we switch back to unassigned, then suddenly the correct score is being displayed.

why would this happen? am I not able to read the team through %clientId on the client so that a player would always remain unassigned to any team? or maybe %clientId's are getting mis-ghosted? i suspect the first but i am not sure as i have never tried this before.

to anyone who is answering, thank you!

EDIT: should i paste full code or do you know the answer already?

#1
07/15/2007 (7:17 am)
I think i got it. i indeed couldnt acces the clientid.team. i had to find the messages and add a clientId.team.teamId in there as an aditional variable.