- Joined
- Jun 20, 2017
- Messages
- 380
How to fix income? Doesn't work or doesn't add any gold!
For example: I have a repeating timer window, which generates gold every 15 seconds, then when a hunter or his teammate kills a farmer which gives 1 gold and increases with killing.
For example: I have a repeating timer window, which generates gold every 15 seconds, then when a hunter or his teammate kills a farmer which gives 1 gold and increases with killing.
-
Hunters Income2
-
Events
- Time - Timer_HuntersIncome expires
- Conditions
-
Actions
-
Player Group - Pick every player in PlayerGroup_Hunters and do (Actions)
-
Loop - Actions
- Player - Add Integer_HuntersIncome to (Picked player) Current gold
- -------- Progame --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Integer_GameModes Equal to 1
-
Then - Actions
-
Player Group - Pick every player in PlayerGroup_Hunters and do (Actions)
-
Loop - Actions
- Player - Add (Integer_HuntersIncome x 2) to (Picked player) Current gold
-
Loop - Actions
-
Player Group - Pick every player in PlayerGroup_Hunters and do (Actions)
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Player Group - Pick every player in PlayerGroup_Hunters and do (Actions)
-
Events
-
Incoming Kill Farmer
-
Events
- Unit - A unit Dies
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Unit-type of (Dying unit)) Equal to Peasant
- (Unit-type of (Dying unit)) Equal to Peasant [Female]
-
Conditions
-
Or - Any (Conditions) are true
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Killing unit)) Equal to Player 10 (Light Blue)
-
Then - Actions
- Set Integers_HuntersIncome[(Player number of (Owner of (Killing unit)))] = (Integers_HuntersIncome[(Player number of (Owner of (Killing unit)))] + 1)
- Set Integers_HuntersIncome[11] = (Integers_HuntersIncome[11] + 1)
- Set Integers_HuntersIncome[12] = (Integers_HuntersIncome[12] + 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Killing unit)) Equal to Player 11 (Dark Green)
-
Then - Actions
- Set Integers_HuntersIncome[(Player number of (Owner of (Killing unit)))] = (Integers_HuntersIncome[(Player number of (Owner of (Killing unit)))] + 1)
- Set Integers_HuntersIncome[10] = (Integers_HuntersIncome[10] + 1)
- Set Integers_HuntersIncome[12] = (Integers_HuntersIncome[12] + 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Killing unit)) Equal to Player 12 (Brown)
-
Then - Actions
- Set Integers_HuntersIncome[(Player number of (Owner of (Killing unit)))] = (Integers_HuntersIncome[(Player number of (Owner of (Killing unit)))] + 1)
- Set Integers_HuntersIncome[10] = (Integers_HuntersIncome[10] + 1)
- Set Integers_HuntersIncome[11] = (Integers_HuntersIncome[11] + 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Hunters Income
-
Events
- Player - Player 10 (Light Blue) types a chat message containing -i as An exact match
- Player - Player 11 (Dark Green) types a chat message containing -i as An exact match
- Player - Player 12 (Brown) types a chat message containing -i as An exact match
- Conditions
-
Actions
- Game - Display to (Player group((Triggering player))) the text: (You killed |cffffcc00 + ((String(Integers_HuntersIncome[(Player number of (Triggering player))])) + Farmers.))
- Game - Display to (Player group((Triggering player))) the text: (Your teammate killed |cffffcc00 + ((String(Integers_HuntersIncome[(Player number of (Triggering player))])) + Farmers.))
- Game - Display to (Player group((Triggering player))) the text: (Which produce |cffffcc00 + ((String(((Integers_HuntersIncome[(Player number of (Triggering player))] x 2) + Integers_HuntersIncome[(Player number of (Triggering player))]))) + gold every 15 seconds.))
-
Events
Last edited: