Can i call on a random player from a player group?
Kinda like this
Create 1 unit for (random player from player group) ... ... ...
As i understand it, player 1 is always player 1 and if player group dont have a player one 1 in it i cant call on a random int from that group. I dont know how to do that, Can you help me please! Going crazy on this one.
Are players/units given new numbers when joining a group depending on the turn they joined it?
Lets say i Put player 8,9 and 10 in "specialgroup" and then write
Unit - Create 1 SPECIALBUILDING for player (Player (Random integer between 1 and 3) from SPECIALGROUP) at Point facing 270.0 degrees (No Options)
Returns the player stored at the specified Index of the specified player group. For example: If you have players 4, 5, and 6 in a player group Index 1 would be Player 4, and this function would return 4.
I have checked, double checked and triple checked the code, and the only conceivable answer to the weird behaviour I'm getting is that the index for player groups is the player number.
E.g. you add player 1, 3 and 4 into player group A, then A[1]=1, A[2] is undefined, A[3]=3 and A[4]=4 (or to be more technically correct Player From Player Group(A, X) = X or Undefined for any X).
I'll be testing this, but the way to do it I believe will be a Pick Each Player From Player Group, put them into an array of integers, then do that style of code.
Can i call on a random player from a player group?
Kinda like this
Create 1 unit for (random player from player group) ... ... ...
As i understand it, player 1 is always player 1 and if player group dont have a player one 1 in it i cant call on a random int from that group. I dont know how to do that, Can you help me please! Going crazy on this one.
Are players/units given new numbers when joining a group depending on the turn they joined it?
Lets say i Put player 8,9 and 10 in "specialgroup" and then write
Unit - Create 1 SPECIALBUILDING for player (Player (Random integer between 1 and 3) from SPECIALGROUP) at Point facing 270.0 degrees (No Options)
Will i then make a unit for player 8, 9 or 10?
does it
it says
Returns the player stored at the specified Index of the specified player group. For example: If you have players 4, 5, and 6 in a player group Index 1 would be Player 4, and this function would return 4.
@b0ne123: Go
Ok thank you!
I have had nothing but issues doing something similar to this.
I have checked, double checked and triple checked the code, and the only conceivable answer to the weird behaviour I'm getting is that the index for player groups is the player number.
E.g. you add player 1, 3 and 4 into player group A, then A[1]=1, A[2] is undefined, A[3]=3 and A[4]=4 (or to be more technically correct Player From Player Group(A, X) = X or Undefined for any X).
I'll be testing this, but the way to do it I believe will be a Pick Each Player From Player Group, put them into an array of integers, then do that style of code.
@AgoutiByte: Go
This simple test will reveal how players are retrieved using the function Player From Player Group.
It will display: PlayerGroup[1] = 1 PlayerGroup[2] = 2 PlayerGroup[3] = 5 PlayerGroup[4] = 6