Kills to cash
Dec 22 2010, 6:42 pm
By: Jesusfreak  

Dec 24 2010, 1:48 pm Gigins Post #21



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.

Dec 24 2010, 4:15 pm Jesusfreak Post #22



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.

Dec 24 2010, 4:50 pm rockz Post #23

ᴄʜᴇᴇsᴇ ɪᴛ!

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?"

Dec 24 2010, 5:49 pm Jesusfreak Post #24



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.

Dec 25 2010, 6:25 am NudeRaider Post #25

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.




Dec 25 2010, 8:00 am Gigins Post #26



Quote
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.
Quote
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.
Quote
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.

Dec 25 2010, 3:23 pm Jesusfreak Post #27



Quote from Gigins
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...

Quote from NudeRaider
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.

Dec 25 2010, 4:34 pm NudeRaider Post #28

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.




Dec 25 2010, 6:41 pm rockz Post #29

ᴄʜᴇᴇsᴇ ɪᴛ!

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?"

Dec 29 2010, 8:18 am Gigins Post #30



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:
testmap.scx
Hits: 2 Size: 54.96kb



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
Please log in to shout.


Members Online: jun3hong, Roy