The reset works like this. Make a simple Death counter timer owned by any of CPs. Like, CP1 has 0 deaths of Unused unit(DC); set deaths of DC to 10; reset kill scores and unit deaths. Always subtract 1 DC for CP1. This way every trigger cycle the DC will be reduced by 1 and when it's 0 it will reset the scores and set the timer back to 10 trigger cycles. And will loop endesly to reduce the errors in calculations.
No lag caused by triggers because they run only when the conditions are met, which is when you kill something.
If for example P1 kills a CP1 marine and P2 kills a CP1 marine at the same time(1/12 of a second) the CP1 will have 2 deaths of marine, P1 will have 100 kills score and P2 will have 100 kill score. The trigger will first run for P1(SC mechanics) P1 will receive 1$ and lose 100 kill score, CP1 will lose 1 death of marine. Then the trigger runs for P2. No possible errors in this situation.
Tons of triggers could cause lag and enlarge your map size quite a lot.
None.
I is confused. How does the loop reduce the errors in calculations? Does the unused unit death counter do anything besides act as a timer?
Will I have to create a trigger to compensate for every possible error scenario? Players will potentially have multiple units, and there's 4 different CPUs they can kill...
None.
do it the 5000 trigger way. The only way to make it perfect without using kills to cash perfect is to mod SC (then it's actually really easy, since you just modify the total kill count).
If for example p1 kills 2 cp1 marines and p2 kills 1 cp1 firebat. Both players have the same score, and cp1 has 2 deaths of marines, 1 death of firebat. if the firebat trigger is first, player 1 will get credit for the firebat.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
Yeah, that makes sense. I'm just worried the 5000 triggers (that's for each unit) would cause lag somehow (I don't know much about how trigger lag works).
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
How lag "works" is easy: Any condition that has to be checked needs a small amount of computing power. Usually unnoticeable it adds up when you have thousands of triggers. It starts lagging if the time needed to check the conditions is longer than the duration of a trigger loops. (Actually earlier since it's not the only thing that needs to be done between trigger cycles) This is obviously also dependent on your processing power. In multiplayer it depends on the slowest computer.
IF it lags is hard to tell beforehand. You'll just have to test, which is quickly done with a testmap and a trigger duplicator.
Keep in mind that checks for switches and death counters are the fastest, while bring is pretty time intensive, so usually you should check any dcs first.
do it the 5000 trigger way. The only way to make it perfect without using kills to cash perfect is to mod SC (then it's actually really easy, since you just modify the total kill count).
If for example p1 kills 2 cp1 marines and p2 kills 1 cp1 firebat. Both players have the same score, and cp1 has 2 deaths of marines, 1 death of firebat. if the firebat trigger is first, player 1 will get credit for the firebat.
If p1 kills exactly 2 marines and p2 kills 1 firebat in 1/12 of a second that will happen. To counter this make a trigger with 2 marines killed. And to be honest this won't happen that ofter, about 1% of the time.
I can't believe you're actually suggesting him to do it 5000 way, thats just plain stupid.
I is confused. How does the loop reduce the errors in calculations? Does the unused unit death counter do anything besides act as a timer?
The loop reduce errors if players happen to have leftover kill score and CPs have leftover Deaths, the loop just resets them and no further errors occur. Leftover KS and DCs could happen in case of an error.
Will I have to create a trigger to compensate for every possible error scenario? Players will potentially have multiple units, and there's 4 different CPUs they can kill...
No since you refresh the system every 10 trigger cycles, don't worry so much about errors. So it will shoot a wrong trigger time to time, so what , players will still get paid and won't even notice that something went wrong. As I said before you can reduce the trigger count to several triggers using Current player and CP Force. Place all your players in Force1 and CPs in Force2. Make a trigger for Force1 or check P1;P2;P3;P4(works the same as Force) and use Current player has 100 kill score Force2 has 1 death of marine; subtract 100 KS +1$ for current player; subtract 1 death of marine for Force2. 10 killable units for 4CP and 4 players, just 10 triggers +2 triggers for the reset loop.
None.
No since you refresh the system every 10 trigger cycles, don't worry so much about errors. So it will shoot a wrong trigger time to time, so what , players will still get paid and won't even notice that something went wrong. As I said before you can reduce the trigger count to several triggers using Current player and CP Force. Place all your players in Force1 and CPs in Force2. Make a trigger for Force1 or check P1;P2;P3;P4(works the same as Force) and use Current player has 100 kill score Force2 has 1 death of marine; subtract 100 KS +1$ for current player; subtract 1 death of marine for Force2. 10 killable units for 4CP and 4 players, just 10 triggers +2 triggers for the reset loop.
It may be significant that the players don't get paid in minerals, they get death counts (which record kills that they turn in for quests and such) and possibly items. If one of the units involved the error happened to be a boss or something, getting paid the wrong thing would be more significant than not getting the correct amount of minerals.
I think your system sounds good, if I could just grasp what it would actually look like in trigger form...
How lag "works" is easy: Any condition that has to be checked needs a small amount of computing power. Usually unnoticeable it adds up when you have thousands of triggers. It starts lagging if the time needed to check the conditions is longer than the duration of a trigger loops. (Actually earlier since it's not the only thing that needs to be done between trigger cycles) This is obviously also dependent on your processing power. In multiplayer it depends on the slowest computer.
IF it lags is hard to tell beforehand. You'll just have to test, which is quickly done with a testmap and a trigger duplicator.
Keep in mind that checks for switches and death counters are the fastest, while bring is pretty time intensive, so usually you should check any dcs first.
Where would kills be on the list (as in, "current player kills exactly 247 zombies")?
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
Not sure but I'd suspect they're nearly as fast as dcs.
kill is identical to death counters. both read r bytes of data. bring has to read the player, the location, and a number.
I think that kills to cash perfect would be interesting to do, but you need one computer to not kill anything, ever. This usually isn't so hard to get. The kills method is the simplest way to get kills to cash to work when you don't have to worry about grinding. You can combine the techniques as well. Have the bosses on the kills methodand the score method, but don't award based on score for th bosses. This is just so the bosses' scores aren't leftover in the players' kill scores. The marines and other grinding units can be cashed with the deaths/score method. I would put the kills to cash triggers which repeat on the computer force, and have one for each player' so you can say "cp has suffered death" and "p1 kill score is x".
You'll end up with 4 triggers for each anyway.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
Ok I made an example testmap with my system. It has 3 players who get $ for kills(2 of the CP controlled), 3 CPs and 2 unit types, lings and hydras. I was wrong telling you that you can use force to calculate deaths, it doesn't work. So we have 3(CPs) x 2(units) + 2(trigger loop) = 8 triggers total. Go ahead and play around with the map in editor and see if it suites you, like add more rines and stuff. If you add splash units or too many rines you should play around with combo calculations to tweak the system. Good luck!
Attachments:
None.