• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Can players select their player number in lobby?

Status
Not open for further replies.
Level 6
Joined
Apr 15, 2012
Messages
205
What I'm wondering is if for an example there are 4 players in a lobby. These players are player 1,2,3,4. Can they then change to be player 1,3,4,5?

Is there a way to prevent them from selecting which player number they are?
 
Level 9
Joined
Dec 21, 2006
Messages
490
to be honest i don't know. the player numbers are the order the players joined the lobby.
you can still save the players in an array inside the map if you need different order. it would be interesting to know why you would like to do this.
 
Level 6
Joined
Apr 15, 2012
Messages
205
I'm creating a leaderboard where the number of rows are the number of active players. If there are 7 players, but one player decided to be player 8 in the lobby, his name won't show up on the leaderboard. When a player kills something I add score to their row using the player number the killing player had. I don't know how to explain it very good.

Maybe the color the player chose decides which player number that he has? Red = player 1, Blue = player 2 etc.

I've noticed that you can't jump down slots in the lobby like you could in WC3.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Use the inbuilt leaderboard functionality of StarCraft II. No need for dealing with rows then as it will handle the rows. All you need to do is deal with the player directly. It can even be made to sort it for you.

It takes a bit of fiddiling to get working but it does work.

The only problem I recall is that player slots are offset incorrectly but a constant can be used to fix this (if it has not been patched).
 
Status
Not open for further replies.
Top