What's the best way to distribute units/buildings in certain regions to players at the beginning of a game or after some modes were set?
My idea is this: (I'd like to hand-code but don't know how... don't see any stickies lying around...)
At the beginning of the game, create a variable with a random number with the max being the number of players allowed in the map, then, have a variable that tracks the last player a region was given to and then move down the list...
Pseudocode:
int startNumber = Get Random number(min being 1, Max being the number of players in the game at the time of the join)
then go down the/a list (array?) of regions and distribute any buildings to that player number
<not sure how to go through a list of regions>
0
What's the best way to distribute units/buildings in certain regions to players at the beginning of a game or after some modes were set?
My idea is this: (I'd like to hand-code but don't know how... don't see any stickies lying around...)
At the beginning of the game, create a variable with a random number with the max being the number of players allowed in the map, then, have a variable that tracks the last player a region was given to and then move down the list...
Pseudocode:
int startNumber = Get Random number(min being 1, Max being the number of players in the game at the time of the join) then go down the/a list (array?) of regions and distribute any buildings to that player number <not sure how to go through a list of regions>