Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Giving reward every few kills?
Giving reward every few kills?
This topic is locked. You can no longer write replies here.
Jun 10 2010, 7:11 pm
By: TheHoss  

Jun 10 2010, 7:11 pm TheHoss Post #1



So I'm trying to figure this out, here's my trigg setup -

- Conditions -
Current Player kills score is exactly 25.
(note, I've tried "at least 25" and "at most 25", still not working)

- Actions -
Create 1 Point at "Reward" for Current Player.
Modify score for Current Player: Subtract 25 Kills.
Preserve Trigger.


No success. Through testing it goes past 25 without granting a point.
Am I doing it all wrong?

I don't want to have to do a trigger for every 25 kills without a preserve trigger effect.
That would be hell.



None.

Jun 10 2010, 7:37 pm NudeRaider Post #2

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

Kills score of 25 is only Broodling. Do you want to detect broodling kills?
Or do you want to detect number of kills?

For the latter a simple method would be to add 1 to a counter each time kills score is > 1 and then reset kills score to 0.
When the counter reaches 25 create the reward and reset the counter.

Explanation: Don't confuse kills score with (number of) kills. Each time you kill a unit the kills counter for that unit goes up by one. But you cannot modify this by triggers so it's impractical to use that for a repeating reward system.
Kills score on the other hand can be modified by triggers but rewards the player with 25-5000 (or more?) score per unit depending on how strong it was. There's a list of all kills scores in the wiki if you need the exact values.
Changing unit stats doesn't change the kills score btw. it's a fixed value for each unit.




Jun 10 2010, 8:55 pm TheHoss Post #3



Ok i'm having trouble understanding that.

I have a trigger for Leaderboard(kills) already.

and i want to detect number of kills yes.



None.

Jun 10 2010, 8:57 pm Aristocrat Post #4



Copy-paste kills-to-cash perfect and make each one add a DC. When DC hits 25, reward 1 civilian.

You're making a mistake that most new mappers commit: trying to get SC to do what you want, rather than working on a system based on SC's restrictions. A lot of really simple things are either impossible or take a lot of triggers to do so, so focus on making things that don't require so many workarounds. ^^

EDIT> Okay, there's a difference between "kill score" and "kills".

"Kill score" for a unit is an increase in score you receive for killing a unit, and is typically equal to the unit's DEFAULT mineral cost * 2 + default gas cost * 4, so for every kill you get a very large number (1 marine kill is worth 100 kill score, for instance.) That's why you are not getting the correct result: you're using something completely different.

Before you ask, no, you cannot modify the "kills" variable in any way. Sorry!



None.

Jun 10 2010, 9:08 pm Azrael Post #5



You can do "Current player has killed at least 25 units" then reward minerals, another one for "at least 50 kills", etc. Use Trigger Duplicator and you can easily make as many as you want in about 5 seconds. I know you said you don't want to do it without something that works on "preserve trigger" but it is a quick and easy way to accomplish what you're trying to do.




Jun 10 2010, 9:10 pm NudeRaider Post #6

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

Good advice from Aristocrat there.

What you want is not possible in the way you wish it to be. I hoped to explain the dilemma with my above post.
I'll try to put it simple so you get the general idea first, then read my above post again and I'm sure it makes more sense then.
When you kill a unit in StarCraft the game adds to 2 separate counters:
- Kills: Can't be modified. 1 kill: Adds 1 to the counter
- Kills Score: Can be modified by triggers. 1 kill: Adds 25-5000 to the counter, depending on the unit you killed.

So when you detect for at least (or exactly) 25 kills you can give 1 civ for reward, but you CAN'T remove the kills from the counter, so from now on EACH TRIGGER LOOP the condition will be met, thus screwing your system.

That's the reason you have to do this:
Quote from NudeRaider
a simple method would be to add 1 to a counter each time kills score is > 1 and then reset kills score to 0.
When the counter reaches 25 create the reward and reset the counter.





Jun 10 2010, 9:14 pm Azrael Post #7



Pro: Uses Preserve Trigger.
Con: Only gives 1 kill when multiple units are killed simultaneously.

Pick your poison. There's not really an ideal solution here.




Jun 10 2010, 10:11 pm TheHoss Post #8



Ok I'm gettin the SC system now. Now to input your system, Nude.

Current Player kills score is at least 1

Modify kills score: Set to 0
Create 1 Point at Reward
preserve.

but i'm missin the whole 25 kills part haha.



None.

Jun 10 2010, 10:42 pm NudeRaider Post #9

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

Third time im writing this now...
Quote from NudeRaider
For the latter a simple method would be to add 1 to a counter each time kills score is > 1 and then reset kills score to 0.
When the counter reaches 25 create the reward and reset the counter.





Jun 11 2010, 12:01 am Azrael Post #10



Can I ask why you need it to use Preserve Trigger? I have put 3000 triggers in for kills before and it caused no lag even with 8 people, and took 10 seconds to do, so I don't see what the issue is.




Jun 11 2010, 12:16 am TheHoss Post #11



Sorry for the confusion. I got it to work at 25 kills, but that's all it does. At 50 it gives nothing.

Here's my triggs-
For the counter:

- Conditions -
Current Player kills at least 1 [any unit]

- Actions -
Modify score for current player: Add 1 kills
Modify score for current player: Subtract 1 kills.
Preserve Trigger.


Now for the reward:

- Conditions -
Current Player kills is exactly 25 [any unit].

- Actions -
Create 1 Selector at 'Reward' for Current Player.
Modify Score for Current Player: Subtract 25 Kills.
Preserve Trigger.



That's what I have. Not sure what I'm missin. So sorry for the confusion, but thanks so much for your help.



None.

Jun 11 2010, 12:20 am Aristocrat Post #12



Quote from TheHoss
Sorry for the confusion. I got it to work at 25 kills, but that's all it does. At 50 it gives nothing.

Here's my triggs-
For the counter:

- Conditions -
Current Player kills at least 1 [any unit]

- Actions -
Modify score for current player: Add 1 kills
Modify score for current player: Subtract 1 kills.
Preserve Trigger.


Now for the reward:

- Conditions -
Current Player kills is exactly 25 [any unit].

- Actions -
Create 1 Selector at 'Reward' for Current Player.
Modify Score for Current Player: Subtract 25 Kills.
Preserve Trigger.



That's what I have. Not sure what I'm missin. So sorry for the confusion, but thanks so much for your help.

:wallbash:

When we said "counter", we meant use "Set Deaths" on a unit that will never die, like Cantina/Mining Platform/W/e. NOT KILL SCORE.



None.

Jun 11 2010, 12:22 am DavidJCobb Post #13



Death counters. For great justice.

Post has been edited 1 time(s), last time on Jun 11 2010, 12:23 am by DavidJCobb. Reason: WIKI BBcode is broken. FUCK.



None.

Jun 11 2010, 12:36 am Aristocrat Post #14



Let's do a rundown of all the things wrong with those two triggers, in the order of what I thought of when I saw each line:

- Conditions -
Current Player kills at least 1 [any unit]

Okay, so this is a "kills" condition. Since kills cannot be changed and this is at least, the trigger will execute at any time after the player kills a unit. Seems okay thus far if it turns on a switch or something.

- Actions -
Modify score for current player: Add 1 kills

Wait a minute, why are we adding a single kill score point? This may be useful if you wanted to associate first kill with kill score, but since killing already gives kill score it's kind of redundant...

Modify score for current player: Subtract 1 kills.
WTF?! We just added a single kill score and now YOU ARE SUBTRACTING IT RIGHT BACK. What. The. Hell. That means this trigger does absolutely nothing.
Preserve Trigger.
WHY IS THIS PRESERVED IT DOES NOTHING WHATSOEVER AND IS ALSO A KILLS CONDITION WHICH SHOULD NEVER BE PRESERVED UNLESS ASSOCIATED DC/HYPER CONSTANT INCOME OMGWTFBBQNERDRAGE


- Conditions -
Current Player kills is exactly 25 [any unit].

*pant* *pant* Okay, nerdrage over... Wait a minute, another kills condition? This is "exactly"? What?

- Actions -
Create 1 Selector at 'Reward' for Current Player.

Okay, reward system... seems okay so far.
Modify Score for Current Player: Subtract 25 Kills.
Wait, Kill Score? Didn't we just explain that kill score is not the same as kills?
Preserve Trigger.
OMFG. No. Preserved AGAIN. Now this is going to spam civilians ad infinitum. Hope in humanity lost.



None.

Jun 11 2010, 1:04 am Lanthanide Post #15



Player kills at least 25 units
Create reward

Player kills at least 50 units
Create reward

Player kills at least 75 units
Create reward

Player kills exactly 100 units
Create reward

.....
Player kills at least 1000 units
Create reward

I hope you get the point. You do NOT need preserve trigger on these triggers, in fact having preserve trigger will make them work incorrectly. Messing with Kill Score is not required at all. This system as I have presented will work 100% of the time in all conditions (splash damage killing multiple units at once, for example), the ONLY downside is that you have to make as many triggers as you want to have rewards for. If players can potentially kill 100,000 units, then you need to have 4,000 triggers ranging from at least 25 kills to at least 100,000 kills in order to get rewards every 25 kills.



None.

Jun 11 2010, 1:22 am TheHoss Post #16



Quote from Lanthanide
Player kills at least 25 units
Create reward

Player kills at least 50 units
Create reward

Player kills at least 75 units
Create reward

Player kills exactly 100 units
Create reward

.....
Player kills at least 1000 units
Create reward

I hope you get the point. You do NOT need preserve trigger on these triggers, in fact having preserve trigger will make them work incorrectly. Messing with Kill Score is not required at all. This system as I have presented will work 100% of the time in all conditions (splash damage killing multiple units at once, for example), the ONLY downside is that you have to make as many triggers as you want to have rewards for. If players can potentially kill 100,000 units, then you need to have 4,000 triggers ranging from at least 25 kills to at least 100,000 kills in order to get rewards every 25 kills.

Going with that. I keep tryin the counter trigg and it wont work correctly. So, one by one it is.



None.

Jun 11 2010, 1:39 am DavidJCobb Post #17



That's time-consuming, but not a bad solution, considering that SC can have 65536 trigs in a map before things get problematic. Good luck. :)



None.

Jun 11 2010, 2:04 am TheHoss Post #18



Well i used trigg duplicator, finished in about 5 min. went to 1000 kills for now, if i need more ill add em :)



None.

Jun 11 2010, 2:11 am Azrael Post #19



Quote from TheHoss
Going with that. I keep tryin the counter trigg and it wont work correctly. So, one by one it is.
If you hadn't kept skipping over every reply I made in this thread, you'd notice I suggested this multiple times already.




Jun 11 2010, 2:17 am TheHoss Post #20



Quote from name:Azrael.Wrath
Quote from TheHoss
Going with that. I keep tryin the counter trigg and it wont work correctly. So, one by one it is.
If you hadn't kept skipping over every reply I made in this thread, you'd notice I suggested this multiple times already.


Sorry about that, thanks for helping friend.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[12:34 pm]
NudeRaider -- curiosity kills the cat!
[06:18 am]
Sylph-Of-Space -- No complaints here, i'm just curious!
[11:05 pm]
Ultraviolet -- :wob:
[2024-5-18. : 3:55 pm]
Zoan -- :wob:
[2024-5-18. : 10:34 am]
NudeRaider -- SEN doesn't rely on spammers initiate its sleep cycle. It hat fully automated rest and clean-up phases. Please understand that this is necessary for the smooth operation of the site. Thank you.
[2024-5-18. : 3:45 am]
Sylph-Of-Space -- Does the shoutbox get disabled when there's spammers?
[2024-5-17. : 6:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[2024-5-17. : 5:41 am]
Ultraviolet -- 🤔 so inf is in you?
[2024-5-17. : 4:57 am]
O)FaRTy1billion[MM] -- my name is mud
[2024-5-17. : 4:35 am]
Ultraviolet -- mud, meet my friend, the stick
Please log in to shout.


Members Online: NudeRaider