I am trying to create an income system where the AI distributes income to the players on its team, adjusted for number of players and leavers. Alternatively, it can be a fixed income that increases the amount of cash given per number of leavers on the team. What would be the simplest way of accomplishing this?
if you want to keep the money constant for each team, create one variable for each team and name it moneyBuffer.
distribute the money as usual but if a player has status "has left" you add the money to the buffer.
whenever the buffer is a multiple of the number of players left in the team, you'll distribute the money even among the remaining players.
or distribute the money each round evenly and keep the rest in the buffer.
if it shall not be constant you create a formula based on players ( Example: ((MaxPlayers - CurrentPlayers) +1 ) * Factor, so is there a teamsize of 5 and 3 remaining players each get 3*Factor minerals, if one is left the income is 5*Factor)
I am trying to create an income system where the AI distributes income to the players on its team, adjusted for number of players and leavers. Alternatively, it can be a fixed income that increases the amount of cash given per number of leavers on the team. What would be the simplest way of accomplishing this?
@Stormahawk: Go
if you want to keep the money constant for each team, create one variable for each team and name it moneyBuffer.
distribute the money as usual but if a player has status "has left" you add the money to the buffer.
whenever the buffer is a multiple of the number of players left in the team, you'll distribute the money even among the remaining players.
or distribute the money each round evenly and keep the rest in the buffer.
if it shall not be constant you create a formula based on players ( Example: ((MaxPlayers - CurrentPlayers) +1 ) * Factor, so is there a teamsize of 5 and 3 remaining players each get 3*Factor minerals, if one is left the income is 5*Factor)