StarCraft® II

Need some help with player selection

Posts: 2,020
Hey everyone.

I am having trouble figuring out how my mod selects who is player 1,2,3,4 etc.

It seems like the Host is always player 1, and the rest is all over the place. I have specific triggers that require me to input Player #'s, but I want people to be able to choose a different role in the lobby.

Essentially, is there a way to make it so that someone can select "Player 3" or whatever number in the lobby?
Edited by Lagorathia on 10/6/2012 9:38 PM PDT
Reply Quote
Posts: 463
No, but you can define what happens after that in game.
Reply Quote
Posts: 2,020
10/06/2012 10:34 PMPosted by Dogmai
No, but you can define what happens after that in game.


well I think im screwed then, or people wil just never know what class they are =(.

Im making a third person mod with WASD controls, and for that to work you have to define players and units for the triggers.

Anyone know how a way around this?
Reply Quote
Posts: 463
You can define players after the game is launched, ie - in the trigger editor.
Reply Quote
Posts: 130
To elaborate a little one what's already been said, the most likely most straightforward way to do what you want is to create a global Player array variable. Call it "Players" or something. In your triggers that require you to input a player, instead of giving the player number directly use the array element indexed at the player number you would have used. You just need to populate the array at map initialization, which is not complex in and of itself, but takes a little bit of doing if you want it to depend on lobby selections.

To make the player select his/her class in the lobby, you'll need to set up a player atttribute and triggers to go with it. Here's an old thread dealing with that subject (and containing a link to an even older thread dealing with that subject) that might help you get started.

Feel free to ask (here, no point necroing) for illumination on any points you find foggy in those sources.
Edited by TheFed on 10/7/2012 11:44 AM PDT
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Explain (256 characters max)
Submit Cancel