Is there any way I can change the player numbers at initialization for team purposes? I have tried the following:
Variable - Set Teams[1][1] = 1
Variable - Set Teams[1][2] = 4
------- --
Variable - Set Teams[2][1] = 2
Variable - Set Teams[2][2] = 3
------- --
Variable - Set Teams[3][1] = 5
Variable - Set Teams[3][2] = 6
------- --
Variable - Set Player[Teams[1][1]] = (Player 1 from (Players on team 1))
Variable - Set Player[Teams[1][2]] = (Player 2 from (Players on team 1))
Variable - Set Player[Teams[2][1]] = (Player 1 from (Players on team 2))
Variable - Set Player[Teams[2][2]] = (Player 2 from (Players on team 2))
Variable - Set Player[Teams[3][1]] = (Player 1 from (Players on team 3))
Variable - Set Player[Teams[3][2]] = (Player 2 from (Players on team 3))
------- --
Player Group - Add player Player[1] to PlayerG[1]
Player Group - Add player Player[2] to PlayerG[2]
Player Group - Add player Player[3] to PlayerG[3]
Player Group - Add player Player[4] to PlayerG[4]
Player Group - Add player Player[5] to PlayerG[5]
Player Group - Add player Player[6] to PlayerG[6]
However this does not appear to be working, example code:
Player - Make player Player[Teams[1][1]] and player Player[Teams[1][2]] treat each other as Ally With Shared Vision
Player - Make player Player[Teams[2][1]] and player Player[Teams[2][2]] treat each other as Ally With Shared Vision
Player - Make player Player[Teams[3][1]] and player Player[Teams[3][2]] treat each other as Ally With Shared Vision
Spawn Player 1
Events
Timer - Player Spawn Timer[Player[1]] expires
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player Player[1] Supplies Used) <= Supply
Then
Unit - Create 1 Tech Penguin for player Player[1] at (Center of Player Base[Player[1]]) facing 270.0 degrees (No Options)
Else
Timer - Start Player Spawn Timer[Player[1]] as a One Shot timer that will expire in Player Spawn Rate[Player[1]] Game Time seconds
Does anyone have any idea what the best option is? If it is the above what is wrong?
heh yea I only have about 200 currently like lol. I also cant use them for spawning as I need to be able to package them in an aray and for example:turntriggOff( Spawn[i] );
I would suggest as Masterwrath says and constuct these properly with loops as they should be. I would just run a nest loop with one integer for player and on for team and then run through the teams and assign them to the proper variable via the previous integers. Whats wrong with the normal teams from the lobby; you've done basically nothing that isn't done automatically. Your last set of actions btw don't have the player variable index updated correctly.
I understand for loops very well and use them a lot, I simply set this up as a test, once it works I convert to a loop. My purpose for these players is for it to chose the correct player base.
What is a better way to get my result? What I want is for the players in teams override the battlenet player number and have everything work correctly so you can choose your spawn location based on team number.
Is there any way I can change the player numbers at initialization for team purposes? I have tried the following:
Variable - Set Teams[1][1] = 1
Variable - Set Teams[1][2] = 4
------- --
Variable - Set Teams[2][1] = 2
Variable - Set Teams[2][2] = 3
------- --
Variable - Set Teams[3][1] = 5
Variable - Set Teams[3][2] = 6
------- --
Variable - Set Player[Teams[1][1]] = (Player 1 from (Players on team 1))
Variable - Set Player[Teams[1][2]] = (Player 2 from (Players on team 1))
Variable - Set Player[Teams[2][1]] = (Player 1 from (Players on team 2))
Variable - Set Player[Teams[2][2]] = (Player 2 from (Players on team 2))
Variable - Set Player[Teams[3][1]] = (Player 1 from (Players on team 3))
Variable - Set Player[Teams[3][2]] = (Player 2 from (Players on team 3))
------- --
Player Group - Add player Player[1] to PlayerG[1]
Player Group - Add player Player[2] to PlayerG[2]
Player Group - Add player Player[3] to PlayerG[3]
Player Group - Add player Player[4] to PlayerG[4]
Player Group - Add player Player[5] to PlayerG[5]
Player Group - Add player Player[6] to PlayerG[6]
However this does not appear to be working, example code:
Player - Make player Player[Teams[1][1]] and player Player[Teams[1][2]] treat each other as Ally With Shared Vision
Player - Make player Player[Teams[2][1]] and player Player[Teams[2][2]] treat each other as Ally With Shared Vision
Player - Make player Player[Teams[3][1]] and player Player[Teams[3][2]] treat each other as Ally With Shared Vision
Spawn Player 1
Events
Timer - Player Spawn Timer[Player[1]] expires
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player Player[1] Supplies Used) <= Supply
Then
Unit - Create 1 Tech Penguin for player Player[1] at (Center of Player Base[Player[1]]) facing 270.0 degrees (No Options)
Else
Timer - Start Player Spawn Timer[Player[1]] as a One Shot timer that will expire in Player Spawn Rate[Player[1]] Game Time seconds
Does anyone have any idea what the best option is? If it is the above what is wrong?
@penguinwars: Go
You are in serious need of some for loops, my friend.
heh yea I only have about 200 currently like lol. I also cant use them for spawning as I need to be able to package them in an aray and for example:turntriggOff( Spawn[i] );
Does anyone know if what I had above would work right or a better solution?
I would suggest as Masterwrath says and constuct these properly with loops as they should be. I would just run a nest loop with one integer for player and on for team and then run through the teams and assign them to the proper variable via the previous integers. Whats wrong with the normal teams from the lobby; you've done basically nothing that isn't done automatically. Your last set of actions btw don't have the player variable index updated correctly.
@hobbidude: Go
I understand for loops very well and use them a lot, I simply set this up as a test, once it works I convert to a loop. My purpose for these players is for it to chose the correct player base.
What is a better way to get my result? What I want is for the players in teams override the battlenet player number and have everything work correctly so you can choose your spawn location based on team number.
If all you want is to choose the spawn location based on team number, why don't you just do something like:
But if you must have dynamic teams, I would just use a player group array.
Think I may have found what I want. Variable - Set Player[(Player 1 from (Players on team 1))] = Teams[1][1];