Anyone have any triggers they would not mind sharing for an 8 player map that gives Rewards at 100 kills, 200 kills, etc, for 8 different players? I have been trying to figure out this trigger for 2 weeks, and every time I can get it to work correctly for player 1, but then all other players add all kill scores together as one. Thanks so much!
Kill Rewards
Events
Unit - Any Unit dies
Local Variables
Player Kill Rewards = 0 <Integer[8]>
Player Kills = 0 <Integer[8]>
Conditions
Actions
Variable - Modify Player Kills[((Killing player) - 1)]: + 1
General - If (Conditions) then do (Actions) else do (Actions)
If
And
Conditions
Player Kill Rewards[((Killing player) - 1)] < 1
Player Kills[((Killing player) - 1)] >= 100
Then
Player - Modify player ((Killing player) - 1) Minerals: Add 100000
Variable - Modify Player Kill Rewards[((Killing player) - 1)]: + 1
Else
Add more If statemets in there for each additional reward if they are different.
If the rewards are all the same and at the same interval, you can do something like this:
Kill Rewards
Events
Unit - Any Unit dies
Local Variables
Player Kill Rewards = 0 <Integer[8]>
Player Kills = 0 <Integer[8]>
Conditions
Actions
Variable - Modify Player Kills[((Killing player) - 1)]: + 1
Variable - Modify Player Kill Rewards[((Killing player) - 1)]: + 1
General - If (Conditions) then do (Actions) else do (Actions)
If
Player Kill Rewards[((Killing player) - 1)] >= 100
Then
Player - Modify player ((Killing player) - 1) Minerals: Add 100000
Variable - Set Player Kill Rewards[((Killing player) - 1)] = 0
Else
Anyone have any triggers they would not mind sharing for an 8 player map that gives Rewards at 100 kills, 200 kills, etc, for 8 different players? I have been trying to figure out this trigger for 2 weeks, and every time I can get it to work correctly for player 1, but then all other players add all kill scores together as one. Thanks so much!
Very quickly, I came up with this.
Kill Rewards
Events
Unit - Any Unit dies
Local Variables
Player Kill Rewards = 0 <Integer[8]>
Player Kills = 0 <Integer[8]>
Conditions
Actions
Variable - Modify Player Kills[((Killing player) - 1)]: + 1
General - If (Conditions) then do (Actions) else do (Actions)
If
And
Conditions
Player Kill Rewards[((Killing player) - 1)] < 1
Player Kills[((Killing player) - 1)] >= 100
Then
Player - Modify player ((Killing player) - 1) Minerals: Add 100000
Variable - Modify Player Kill Rewards[((Killing player) - 1)]: + 1
Else
Add more If statemets in there for each additional reward if they are different.
If the rewards are all the same and at the same interval, you can do something like this:
Kill Rewards
Events
Unit - Any Unit dies
Local Variables
Player Kill Rewards = 0 <Integer[8]>
Player Kills = 0 <Integer[8]>
Conditions
Actions
Variable - Modify Player Kills[((Killing player) - 1)]: + 1
Variable - Modify Player Kill Rewards[((Killing player) - 1)]: + 1
General - If (Conditions) then do (Actions) else do (Actions)
If
Player Kill Rewards[((Killing player) - 1)] >= 100
Then
Player - Modify player ((Killing player) - 1) Minerals: Add 100000
Variable - Set Player Kill Rewards[((Killing player) - 1)] = 0
Else
@TawnosSC2: Go
Thank you!!
@chubz04:
oh btw, those local variables need to be global variables.