I wonder if anyone can help me build a trigger I need for my map. The trigger is supposed to work like this:
A timer appears in the bottom left corner of the screen for all players with a countdown of 30 seconds. When the countdown reaches 0, the trigger restarts from 30 down to 0 again, and again.. until the game is over.
When the timer reaches 0, each player is given resources, depending on how much supply they have.
If a player has below 10 supply, that player receives 300 minerals and gas. If a player has between 11-20 supply, that player receives 270 minerals and gas. If a player has between 21-30 supply, that player receives 240 minerals and gas. If a player has between 31-40 supply, that player receives 210 minerals and gas. And so on, up to 100 supply...
Anyone feel like showing me how to build this trigger?
Depending on how you want to make it, it could be as simple as a basic mathematical formula inside the trigger itself. Something like this:
Player Group - For each player i in (Active Players) do (Actions) Actions
Player - Modify player i Minerals: Add (600 - (((Player i Supplies Used) / 10) * 30))
It cycles through eatch active players then add minerals based on their supply. Here I set it like this:
600, the maximum gaining amount of minerals. I did not use 300 because of how it seems you want to set it where every 10 more supply used you get 30 less minerals. This means at 100 supply you would get nothing, but you can have up to 200 supply, so 600. But you do whatever you want.
Then I do, "Player i supplies used" (which is the numerator for you supplies, the "20/45" for example 20)
Divided by 10, because you want to make changes every 10 supply
All that multiplied by 30, for 30 minerals. So if I complete my example with 20/45 it does this: