Right, but that still doesn't answer my question since the game can re-fill up after someone leaves, thus re-filling the player 1 slot by a later-comer...any other ideas? Seems like this should be a Player Attribute but it doesn't appear to be.
How can you detect which player was the Host in the Lobby via triggers during runtime?
There is no game host.
B.net is host..... My suggestion is track how many times people have played your map.... and make the person with most plays the host...... if theres some kinda in-game config they need to do....
but i suggest making maps where you dont need a person in game to select settings..... this is doable by allowing players to vote ingame...
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
I already implemented a voting system and now would like to implement an alternate mode where the player who has privileges as Game Host in the Lobby also has special privileges in-game. Your statement "B.net is host" seems misplaced here...I understand bnet is hosting the game but that has nothing to do with this issue, which involves detecting who was set as Game Host in the Lobby (not what service/network/computer is "hosting" the game). Apparently it is not possible to detect who was game host in lobby then. Another shortcoming of b.net.
I already implemented a voting system and now would like to implement an alternate mode where the player who has privileges as Game Host in the Lobby also has special privileges in-game. Your statement "B.net is host" seems misplaced here...I understand bnet is hosting the game but that has nothing to do with this issue, which involves detecting who was set as Game Host in the Lobby (not what service/network/computer is "hosting" the game). Apparently it is not possible to detect who was game host in lobby then. Another shortcoming of b.net.
Player 1 is the first person who joined, aka the person who "hosted" the game. If player 1 isn't there, then he left, and thus there is no longer a "host". Since games are hosted by battle.net now and not limited to players hosting and joining games (like in sc1 or wc3), there is no more need for a "host" and thus the concept becomes irrelevant. I would suggest either abandoning the idea of working with a host or simply make it so your game goes down the line and finds a person to select the modes (i.e. the minimum player of 1-14)
I totally agree that the concept of Game Host is a bit misplaced in the modern SC2. However, under Game Attributes, you can create a new attribute in the Lobby and lock it so only the Game Host can change it (the host is marked with "HOST" in the player list in the Lobby). This seems like a fairly commonly employed technique so I thought I'd try it with my map as well. However, not being able to detect who this special player is once in-game is another sadly absent feature in the editor/API.
The first person that joins the game is Player 1. Regardless of slot in the game lobby. If that player 1 leaves, then the second player who joined is Player 1. It doesn't matter if they promote someone else to "Game Host". Because they will STILL be player 1.
EDIT: Who that "Game Host" is in the game lobby is not retrievable.
EDIT: Who that "Game Host" is in the game lobby is not retrievable.
Actually, maybe you can retrieve who it is. If the first player that joined the lobby is to become player 1 in the game (which is absolutely sure, by the way), even if he quits the lobby and another player takes his place, the new host will still gain control of units of player 1 when entering the game... I totally agree with you on that, I tested it for days when releasing each of my maps.
So you can assume that the host, whenever someone quits the lobby or not, will ALWAYS be the owner of the units controlled by player 1 unless you set it otherwise yourself in a trigger during map init. As long as you store the information in a variable during the map initialization, you can retrieve it later.
You can also assume the player who joined the lobby after the host will take control of units from player 2, and so on for each player... So basically, if you want to know who joined the lobby and when, you'll have to look for who controls which units, store it in a variable, and only then can you do your usual alliance attribution/player slot recognition in a map init trigger (if and only if you have multiple teams or the need to know who chose which parameter in the lobby).
I just tested and if Player A comes into the lobby, then Player B, Player A will be Player 1 in the game. If Player A comes into the game, then Player B, then player A leaves, then comes back, he is still set as Player 1 even though Player B is the Host in the lobby. Conclusion: you cannot rely on lobby slot position to determine game host.
I feel the confusion is coming from your posts, actually...I'm not sure where you got the ideas to mention (2) and (3) from my original post. It's pretty clear that I'm interested in (1). Also, two of your posts contain vague or factually incorrect statements (specifically your first and third posts), thus adding to confusion and reducing the usefulness of this thread. I do appreciate your comments, however.
To clear up any other confusion, you're looking specifically for the player that had originally created the game.
If you tested Player A joining, Player B joining, Player A LEAVING, and then Player A REJOINING.... and player A still comes up as player 1 ingame, then perhaps that's his penalty (losing the ingame bonus of being "the host") for leaving.
Otherwise, the actual variable you're looking for is which person in this current game, created a game with this map the most recently. Which sounds like something outside of possible :/
You're actually adding to the confusion. Here, I'll quote my first post: "How can you detect which player was the Host in the Lobby via triggers during runtime?"
@jcraigk: Go
I'm assuming your looking for the player who had control of the lobby when the game actually starts. correct? If so, then my post is correct. If not, then I'm confused by what you said.
"I just tested and if Player A comes into the lobby, then Player B, Player A will be Player 1 in the game. If Player A comes into the game, then Player B, then player A leaves, then comes back, he is still set as Player 1 even though Player B is the Host in the lobby. Conclusion: you cannot rely on lobby slot position to determine game host."
That implies that you either want Player 1 at all times, or you want the person who had control over the lobby when the game actually starts.
What am I missing? Sorry if I'm misunderstanding you still - just trying to help :)
Hey I think like you're pointing out already, there is no way to detect who was the host, meaning the person who can start the game if its not full, or in a private game - the person who can start the game. The Host.
So, in place of not being able to detect the host, maybe that alternate mode you wre speaking of should vote for the "in-game host", meh?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
How can you detect which player was the Host in the Lobby via triggers during runtime?
@jcraigk: Go
Player 1 is always the host... Pretty sure.
@jaxter184: Go
It will go down the line.
@Enexy: Go
Right, but that still doesn't answer my question since the game can re-fill up after someone leaves, thus re-filling the player 1 slot by a later-comer...any other ideas? Seems like this should be a Player Attribute but it doesn't appear to be.
There is no game host.
B.net is host..... My suggestion is track how many times people have played your map.... and make the person with most plays the host...... if theres some kinda in-game config they need to do....
but i suggest making maps where you dont need a person in game to select settings..... this is doable by allowing players to vote ingame...
@SouLCarveRR: Go
I already implemented a voting system and now would like to implement an alternate mode where the player who has privileges as Game Host in the Lobby also has special privileges in-game. Your statement "B.net is host" seems misplaced here...I understand bnet is hosting the game but that has nothing to do with this issue, which involves detecting who was set as Game Host in the Lobby (not what service/network/computer is "hosting" the game). Apparently it is not possible to detect who was game host in lobby then. Another shortcoming of b.net.
Player 1 is the first person who joined, aka the person who "hosted" the game. If player 1 isn't there, then he left, and thus there is no longer a "host". Since games are hosted by battle.net now and not limited to players hosting and joining games (like in sc1 or wc3), there is no more need for a "host" and thus the concept becomes irrelevant. I would suggest either abandoning the idea of working with a host or simply make it so your game goes down the line and finds a person to select the modes (i.e. the minimum player of 1-14)
@peranzormal: Go
I totally agree that the concept of Game Host is a bit misplaced in the modern SC2. However, under Game Attributes, you can create a new attribute in the Lobby and lock it so only the Game Host can change it (the host is marked with "HOST" in the player list in the Lobby). This seems like a fairly commonly employed technique so I thought I'd try it with my map as well. However, not being able to detect who this special player is once in-game is another sadly absent feature in the editor/API.
@jcraigk: Go
The first person that joins the game is Player 1. Regardless of slot in the game lobby. If that player 1 leaves, then the second player who joined is Player 1. It doesn't matter if they promote someone else to "Game Host". Because they will STILL be player 1.
EDIT: Who that "Game Host" is in the game lobby is not retrievable.
does it matter? you can just make a random player the "host" but the game itself is hosted on battle.net and not by player 1. its purely theoretical
Actually, maybe you can retrieve who it is. If the first player that joined the lobby is to become player 1 in the game (which is absolutely sure, by the way), even if he quits the lobby and another player takes his place, the new host will still gain control of units of player 1 when entering the game... I totally agree with you on that, I tested it for days when releasing each of my maps.
So you can assume that the host, whenever someone quits the lobby or not, will ALWAYS be the owner of the units controlled by player 1 unless you set it otherwise yourself in a trigger during map init. As long as you store the information in a variable during the map initialization, you can retrieve it later.
You can also assume the player who joined the lobby after the host will take control of units from player 2, and so on for each player... So basically, if you want to know who joined the lobby and when, you'll have to look for who controls which units, store it in a variable, and only then can you do your usual alliance attribution/player slot recognition in a map init trigger (if and only if you have multiple teams or the need to know who chose which parameter in the lobby).
I just tested and if Player A comes into the lobby, then Player B, Player A will be Player 1 in the game. If Player A comes into the game, then Player B, then player A leaves, then comes back, he is still set as Player 1 even though Player B is the Host in the lobby. Conclusion: you cannot rely on lobby slot position to determine game host.
@jcraigk: Go
Like I said in my post above this one.
I believe this thread is very confusing as there are probably three different definitions of "Game Host" right about now.
Here is my factual answer to each type of game host.
@Enexy: Go
I feel the confusion is coming from your posts, actually...I'm not sure where you got the ideas to mention (2) and (3) from my original post. It's pretty clear that I'm interested in (1). Also, two of your posts contain vague or factually incorrect statements (specifically your first and third posts), thus adding to confusion and reducing the usefulness of this thread. I do appreciate your comments, however.
@jcraigk: Go
To clear up any other confusion, you're looking specifically for the player that had originally created the game.
If you tested Player A joining, Player B joining, Player A LEAVING, and then Player A REJOINING.... and player A still comes up as player 1 ingame, then perhaps that's his penalty (losing the ingame bonus of being "the host") for leaving.
Otherwise, the actual variable you're looking for is which person in this current game, created a game with this map the most recently. Which sounds like something outside of possible :/
@playpong: Go
You're actually adding to the confusion. Here, I'll quote my first post: "How can you detect which player was the Host in the Lobby via triggers during runtime?"
Host != First Player in the case you stated.
@jcraigk: Go I'm assuming your looking for the player who had control of the lobby when the game actually starts. correct? If so, then my post is correct. If not, then I'm confused by what you said.
"I just tested and if Player A comes into the lobby, then Player B, Player A will be Player 1 in the game. If Player A comes into the game, then Player B, then player A leaves, then comes back, he is still set as Player 1 even though Player B is the Host in the lobby. Conclusion: you cannot rely on lobby slot position to determine game host."
That implies that you either want Player 1 at all times, or you want the person who had control over the lobby when the game actually starts.
What am I missing? Sorry if I'm misunderstanding you still - just trying to help :)
@playpong: Go
Should probably just lock the post, the OP's question is answered and everyone is just confusing themselves now :)
@jcraigk: Go
Hey I think like you're pointing out already, there is no way to detect who was the host, meaning the person who can start the game if its not full, or in a private game - the person who can start the game. The Host.
So, in place of not being able to detect the host, maybe that alternate mode you wre speaking of should vote for the "in-game host", meh?