- Joined
- Aug 5, 2010
- Messages
- 147
I have a trigger that gives gold to players at the end of a wave, i am trying to give extra gold to the player with the lowest kills.
I have managed to make it so Player 1 gets extra gold but the method i used to do this would mean i have to create a lot of extra actions that i dont think i need to do, as im guessing their is a better way to do this. My trigger also does not account for when multiple players have the same amount of kills.
Trigger is below
I have managed to make it so Player 1 gets extra gold but the method i used to do this would mean i have to create a lot of extra actions that i dont think i need to do, as im guessing their is a better way to do this. My trigger also does not account for when multiple players have the same amount of kills.
Trigger is below
-
Gold After Wave
-
Events
-
Conditions
-
Actions
-
Set GoldAfterWave = (GoldAfterWave + (Random integer number between 20 and 40))
-
Set PlayerGroup[7] = (All allies of Player 1 (Red))
-
Player Group - Pick every player in PlayerGroup[7] and do (Actions)
-
Loop - Actions
-
Player - Add GoldAfterWave to (Picked player) Current gold
-
-
-
Game - Display to PlayerGroup[7] the text: (|cff00FF00You have completed a wave and have been given |r + (|cffFDD017 + ((String(GoldAfterWave)) + ( Gold + |r))))
-
For each (Integer A) from 2 to 9, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Kills[1] Less than Kills[(Integer A)]
-
-
Then - Actions
-
Player - Add (GoldAfterWave / 2) to Player 1 (Red) Current gold
-
Game - Display to PlayerGroup[7] the text: ((MultiBoard_Colours[1] + (Name of Player 1 (Red))) + (|r |cff00FF00has been given|r |cffFDD017 + ((String((GoldAfterWave / 2))) + ( Extra Gold + |r |cff00FF00for having the lowest amount of kills.|r))))
-
-
Else - Actions
-
-
-
-
Custom script: call DestroyForce(udg_PlayerGroup[7])
-
-