So I've been reading up on lobby teams on here for a 4v4 custom map I'm making, and my issue is that I have a dialog that displays a label for each player on the team and they have random start locations.
From what I've read on here (albeit old threads), I've come to the conclusion player number is determined by the order in which a person joins the lobby, and this can have a negative impact.
For me, this would mess with the player's label showing up on opposite teams of what they are on. So it may be Player 1, Player 5, Player 6, Player 3 vs Player 4, Player 2, Player 7. Player 8 but the dialog would still show Players 1-4 vs Players 5-8. People who have played Team Monobattles would understand what I'm talking about, as it is a dialog that displays images based on players' unit choices and sorts it based on who is on which team.
Is this still the issue on Battle.net? Is this something easily fixed?
My assumption is that I'd have to store player and team locations using the Player is on Team 1 and Team 2 functions, but I'm too burnt out from using the editor today to figure out how I would go about setting up the variables and doing all the loops and actions for that. And aside from fixing the dialog so that players and teams matched up, I need to make it so that team placement works too (which in testing on single player with A.I. puts all the players in random spots, not according to team, unless they are forced to a spawn location in the Player Options -> Player Start Location.)
So if anyone has a good idea of what I'm looking at for what I'd have to do, that would be a great help.
You can't rely on lobby order for player numbers. For example, let's say a lobby completely fills up (8 players in your case), then 2 of those players leave. The remaining players are now sequenced as 1-6, I believe, and when new players come in, I think they come in as 7 and 8. I'm not 100% sure about this but either way, it's a bad idea to assume that Players 1-4 are actually allied / on the same team imo. You should instead check Player Attributes given your team setup in the lobby (sounds like 2 Teams) and separate them that way.
In general, I recommend creating a Record that holds all your player data and make an array of those Records. So then you could hold team number in recPlayer[1].intTeam for example, which is totally independent of how the game itself manages teams. You get lots of flexibility this way.
Also, a note on start locations: if you're currently using the standard Create Starting Units for All Players, you're probably going to need to loop through each player and use Create Starting Units for Player and give it the point that you pre-calculated. recPlayers[1].pSpawnPoint, for example.
So I've been reading up on lobby teams on here for a 4v4 custom map I'm making, and my issue is that I have a dialog that displays a label for each player on the team and they have random start locations.
From what I've read on here (albeit old threads), I've come to the conclusion player number is determined by the order in which a person joins the lobby, and this can have a negative impact.
For me, this would mess with the player's label showing up on opposite teams of what they are on. So it may be Player 1, Player 5, Player 6, Player 3 vs Player 4, Player 2, Player 7. Player 8 but the dialog would still show Players 1-4 vs Players 5-8. People who have played Team Monobattles would understand what I'm talking about, as it is a dialog that displays images based on players' unit choices and sorts it based on who is on which team.
Is this still the issue on Battle.net? Is this something easily fixed?
My assumption is that I'd have to store player and team locations using the Player is on Team 1 and Team 2 functions, but I'm too burnt out from using the editor today to figure out how I would go about setting up the variables and doing all the loops and actions for that. And aside from fixing the dialog so that players and teams matched up, I need to make it so that team placement works too (which in testing on single player with A.I. puts all the players in random spots, not according to team, unless they are forced to a spawn location in the Player Options -> Player Start Location.)
So if anyone has a good idea of what I'm looking at for what I'd have to do, that would be a great help.
@Quelex: Go
You can't rely on lobby order for player numbers. For example, let's say a lobby completely fills up (8 players in your case), then 2 of those players leave. The remaining players are now sequenced as 1-6, I believe, and when new players come in, I think they come in as 7 and 8. I'm not 100% sure about this but either way, it's a bad idea to assume that Players 1-4 are actually allied / on the same team imo. You should instead check Player Attributes given your team setup in the lobby (sounds like 2 Teams) and separate them that way.
In general, I recommend creating a Record that holds all your player data and make an array of those Records. So then you could hold team number in recPlayer[1].intTeam for example, which is totally independent of how the game itself manages teams. You get lots of flexibility this way.
Also, a note on start locations: if you're currently using the standard Create Starting Units for All Players, you're probably going to need to loop through each player and use Create Starting Units for Player and give it the point that you pre-calculated. recPlayers[1].pSpawnPoint, for example.