When you are in a normal SC2 game and a team mate leaves the game, such as a 4v4 and one guy leaves so its 3v4. the party members get a portion of the minerals and gas from the player that left. I have been trying to figure out a Formula to this but need some help with it.
I imagine it goes something like this
Minerals / Members in party = Minerals per player
yes?
1000 minerals / 2 players = 500 minerals per player?
for 4v4 for example i would do something like this:
event: player leaves
Action:
set variable "R" = number of minerals of (triggering player)
if (triggering player) is on team a
then:
modify variable R divide by (number of active players on team a)
Pick each player on team a and do actions:
modify player property (picked player) minerals: add (R)
else:
modify variable R divide by (number of active players on team b)
Pick each player on team b and do actions:
modify player property (picked player) minerals: add (R)
When you are in a normal SC2 game and a team mate leaves the game, such as a 4v4 and one guy leaves so its 3v4. the party members get a portion of the minerals and gas from the player that left. I have been trying to figure out a Formula to this but need some help with it.
I imagine it goes something like this
Minerals / Members in party = Minerals per player
yes?
1000 minerals / 2 players = 500 minerals per player?
for 4v4 for example i would do something like this:
event: player leaves
Action:
set variable "R" = number of minerals of (triggering player)
if (triggering player) is on team a
then:
modify variable R divide by (number of active players on team a)
Pick each player on team a and do actions:
modify player property (picked player) minerals: add (R)
else:
modify variable R divide by (number of active players on team b)
Pick each player on team b and do actions:
modify player property (picked player) minerals: add (R)
@joey101d: Go
would this also work for minerals gathered during the game afterwards, such as SCV Gathering minerals?
@SC2UniversalDomination: Go
i forgot about that, you would have to add this on:
after the minerals are given out, set the leaving player's minerals to zero, and repeat this function every few seconds after that.
note you may want to make a variable array in case there are multiple leaving players.
@joey101d: Go
Thanks.
I thought SCVs stopped after a player left, but I haven't played a ton of team games. Something to consider if you want them to keep mining.