How to get a player's number / value / index number / integer?

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,732
The equivalent WarCraft 3 trigger is:

Trigger:
  • Player - Player number of (Triggering Player)


How do I get that in SC2 Trigger Editor?

Thanks in advance.
 

Cheekything

TH.net Regular
Reaction score
5
How do you know which player is which though?

Is it decided by who joins the game lobby first or by colour?
 

Frozenwind

System maker
Reaction score
99
I'm fairly sure first to join is one. One time I made a friend be on slot 1 and made him be host+red, but I was still the one who joined first and thus I still was marked as player 1.
 

EnderA

New Member
Reaction score
0
Anyone know what the range is? Does it go from 0-15 or 1-16 or what?

It's important because I'm using player numbers as indices in my arrays.
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,732
Really? I thought 13 and 14 are able to be users.

And I guess this proves the maximum amount of players in one map is 12.

Thank you for the info, guys. Great help! :D
 

Arkless

New Member
Reaction score
31
Really? I thought 13 and 14 are able to be users.

And I guess this proves the maximum amount of players in one map is 12.

Thank you for the info, guys. Great help! :D

I didn't test if it works, but in the player properties I can set all 16 players to be human.
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,732
But I'm sure you'll see one player not able to be attacked, and one player prone to being attacked by the other 14 players.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top