I need to know how to detect when at the end of the timer if both teams have the exact same minereal count.
Thanks.
None.
You can do it manually with a bunch of Accumulates conditions.
Or, you can put the following trigger:
Conditions:
Countdown timer is at most 0 seconds.
Player 1 accumulates at least one mineral.
Player 2 accumulates at least one mineral.
Actions:
Subtract 1 mineral for player 1.
Subtract 1 mineral for player 2.
Then, if one team has 0 mins but the other team has more than 0, they had different mineral amounts when the timer expired.
(You can also increment a DC every time you subtract a mineral, then use that to give the minerals back after the check.)
None.
Okay, I guess I could do that.. but is there a way to do it within one trigger?
The problem is; this is a game that the minereals vary from 0 to anywhere to roughly 300.
The thing is set up like this.
You kill an enemy, you get +1 minereal.
You retrieve a flag, you get +15 minereals.
So.. you see my problem in using accumilation?
None.
I just told you... Create a bunch of triggers that reduce both players minerals by 1 when the timer expires if both players have at least one mineral, and make 300 copies. Then detect if both players have 0 minerals or if one player has more that 0. (If they both have more than 0, keep subtracting.)
None.
I know you told me.. but you must of missed the part in my post about "one trigger".
Because I re-call doing this before, without having to subtract anything.. I just can't remember it.
None.
I have no clue, then.
WAIT! I do!
Create a DC called Score. Whenever a player gets their minerals increased, increase their Score DC by the same amount. (So increase by 1 for a kill, or by 15 for a flag return.) If both player's Score DCs are greater than 0, decrease them both by 1. Then, if they have the same mineral amount, they will both have their Score DC at 0.
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Well you can do binary count-offs (subtract 256,128,64,32,16,8,4,2,1 minerals) which will do the trick within one trigger loop, but thats 8 triggers + 8 triggers to compare if one team has reached zero before the other.
If you don't want to spend more than one trigger then do what TZ suggested. But that method will take several trigger loops.
There's no 'greater than' / 'smaller than' / 'equals' operation in sc triggering. You have to build your own functions if you need that.
I have no idea how you would have done a compare function without using subtract.
Also, TZ, about your solution: How would you detect mineral increase?
He said it only occours when you kill an enemy or retrieve a flag.
None.
Transfer both into separate death counts, until one is out, the first one to run out is lower, if both run out at the same time, then they are the same, once you're done with that, transfer the minerals back, Binary Count-Offs is pretty much essential for easy triggering.
Rather than copying the trigger 300 times like said before, just use
Binary Countoffs to transfer it with less triggers.
None.
http://www.staredit.net/wiki/Resource_SharingTake a look at resource sharing too.
It essentially detects when two people DON'T have the same minerals.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
Posted this in the SniperForums but figured I'd copy here too:
Team HOTConditions:- Countdown Timer is exactly zero.
- Current Player has accumulated the most Ore.
Actions:- Set "HOT Winning."
- Preserve Trigger.
Team COLDConditions:- Countdown Timer is exactly zero.
- Current Player has accumulated the most Ore.
Actions:- Set "COLD Winning."
- Preserve Trigger.
All PlayersConditions:- "HOT Winning" is set.
- "COLD Winning" is set.
Actions:- Set countdown timer to 180 seconds.
- Clear "HOT Winning."
- Clear "COLD Winning."
Then just change the victory conditions to if "HOT Winning" is set
and "COLD Winning" is cleared to victory HOT; vice versa for the other team. This allows for indefinite overtime periods.
None.
Oh, good one! Yah, Most does weird stuff at times...
That's your best solution, go with that.
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
omg, that's like kills to cash perfect. When both players have the most minerals they have the same. Simple yet efficient. Yeah sorry for not thinking about it.
I never remember those Most triggers, they do come in handy a lot though..
None.