HydraRancher
Truth begins in lies
- Reaction score
- 197
Now working on my TD I thought I should turn my income triggers into arrays:
Trigger:
- Income
- Events
- Unit - A unit enters (Playable map area)
- Conditions
- ((Triggering unit) is A structure) Equal to False
- ((Owner of (Triggering unit)) Equal to Player 1 (Red)) or ((Owner of (Triggering unit)) Equal to Player 2 (Blue))
- Actions
- If ((Unit-type of (Triggering unit)) Equal to Skeleton) then do (Set IncomeGold = (IncomeGold + 1)) else do (Do nothing)
- If ((Unit-type of (Triggering unit)) Equal to Marine) then do (Set IncomeGold = (IncomeGold + 2)) else do (Do nothing)
- If ((Unit-type of (Triggering unit)) Equal to Voidwalker) then do (Set IncomeGold = (IncomeGold + 5)) else do (Do nothing)
- Events
Trigger:
- Income Gain
- Events
- Time - Every 1.00 seconds of game time
- Conditions
- Actions
- For each (Integer A) from 1 to 2, do (Actions)
- Loop - Actions
- Player - Add IncomeGold to (Player((Integer A))) Current gold
- Player - Add IncomeLumber to (Player((Integer A))) Current lumber
- Loop - Actions
- For each (Integer A) from 3 to 4, do (Actions)
- Loop - Actions
- Player - Add IncomeGold_2 to (Player((Integer A))) Current gold
- Player - Add IncomeLumber_2 to (Player((Integer A))) Current lumber
- Loop - Actions
- For each (Integer A) from 5 to 6, do (Actions)
- Loop - Actions
- Player - Add IncomeGold_3 to (Player((Integer A))) Current gold
- Player - Add IncomeLumber_3 to (Player((Integer A))) Current lumber
- Loop - Actions
- For each (Integer A) from 7 to 8, do (Actions)
- Loop - Actions
- Player - Add IncomeGold_4 to (Player((Integer A))) Current gold
- Player - Add IncomeLumber_4 to (Player((Integer A))) Current lumber
- Loop - Actions
- For each (Integer A) from 9 to 10, do (Actions)
- Loop - Actions
- Player - Add IncomeGold_5 to (Player((Integer A))) Current gold
- Player - Add IncomeLumber_5 to (Player((Integer A))) Current lumber
- Loop - Actions
- For each (Integer A) from 1 to 2, do (Actions)
- Events
Trigger:
- Income Notify
- Events
- Time - Timer expires
- Conditions
- Actions
- Game - Display to Group_1 the text: (You gain + ((String(IncomeGold)) + gold per second))
- Game - Display to Group_1 the text: (You gain + ((String(IncomeLumber)) + gold per second))
- Events
Trigger:
- income show
- Events
- Time - Every 20.00 seconds of game time
- Conditions
- Actions
- Game - Display to (All players) the text: (Group 1 (player 1 and 2) gold= + (String(IncomeGold)))
- Game - Display to (All players) the text: (Group 2 (player 3 and 4) gold= + (String(IncomeGold_2)))
- Game - Display to (All players) the text: (Group 3 (player 5 and 6) gold= + (String(IncomeGold_3)))
- Game - Display to (All players) the text: (Group 4 (player 7 and 8) gold= + (String(IncomeGold_4)))
- Game - Display to (All players) the text: (Group 5 (player 9 and 10) gold= + (String(IncomeGold_5)))
- Game - Display to (All players) the text: (Group 1 (player 1 and 2) lumber= + (String(IncomeLumber)))
- Game - Display to (All players) the text: (Group 2 (player 3 and 4) lumber= + (String(IncomeLumber_2)))
- Game - Display to (All players) the text: (Group 3 (player 5 and 6) lumber= + (String(IncomeLumber_3)))
- Game - Display to (All players) the text: (Group 4 (player 7 and 8) lumber= + (String(IncomeLumber_4)))
- Game - Display to (All players) the text: (Group 5 (player 9 and 10) lumber= + (String(IncomeLumber_5)))
- <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_4">
- <li class="lasttree"><span class="default">can you help?</span></li>
- </ul>
- </div></div>
- Events