So right now I have player colors locked so you can see in the lobby what individual "nation" you are going to be in game (right now there are 3 teams and each "nation" is different). Working off of this, I have many triggers where their actions are based upon the player number (IE If owner of Triggering unit == 1 etc). I also want each nation to always be a set color.
What I would LIKE to happen is for people to be able to select what nation they are going to be in the game while in the lobby, and then my triggers be able to determine what the player number of that "nation" is and use it.
I have read tutorials and played with it and looked around in the trigger editor but I'm clueless as to how to figure this one out, anyone help?
Option 1 - Create a global variable for each nation
Make it a boolean array, size = max amount of players
When a player selects that nation, the (index - 1) of the array of that nation gets set to true (you use index - 1 because the array starts at 0, but player numbers start at 1)
Then to check you who belongs to that nation, you just do Pick Each Integer from 0 to max amount of players with an if statement if true
Option 2 - Make an integer array with size max amount of players, index 0 of the array would represent the nation for player 1, etc
Ok, I'll try and make this clear.
So right now I have player colors locked so you can see in the lobby what individual "nation" you are going to be in game (right now there are 3 teams and each "nation" is different). Working off of this, I have many triggers where their actions are based upon the player number (IE If owner of Triggering unit == 1 etc). I also want each nation to always be a set color.
What I would LIKE to happen is for people to be able to select what nation they are going to be in the game while in the lobby, and then my triggers be able to determine what the player number of that "nation" is and use it.
I have read tutorials and played with it and looked around in the trigger editor but I'm clueless as to how to figure this one out, anyone help?
2 options
Option 1 - Create a global variable for each nation Make it a boolean array, size = max amount of players
When a player selects that nation, the (index - 1) of the array of that nation gets set to true (you use index - 1 because the array starts at 0, but player numbers start at 1) Then to check you who belongs to that nation, you just do Pick Each Integer from 0 to max amount of players with an if statement if true
Option 2 - Make an integer array with size max amount of players, index 0 of the array would represent the nation for player 1, etc
@SweetZombieJesus: Go
That works after the player has selected the nation, but I am trying to make it while they're in the lobby. Thanks for that much though :)