Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Every 20 kills you get 1 Unit. How I do this?
Every 20 kills you get 1 Unit. How I do this?
Jun 15 2009, 7:40 pm
By: m.0.n.3.y  

Jun 15 2009, 7:40 pm m.0.n.3.y Post #1



Ok so how would I make it so that every 10 kills the player gets 5 ore, and that every 20 kills the player gets 1 terran civilian at location X. Here's what I did.

Ok so then, how do I create a repeatable system where when someone kills 20 units, it creates 1 terran civilian for them. But how do I do this so I only have to use like 3 triggers, instead of repeating the same trigger over and over.

Ex: I dont want to do this.
Current player kills 40 Units, etc. etc.
Current player kills 60 Units, etc. etc.
Current player kills 80 Units, etc. etc.

However, I just want to do this system with like 3 triggers, is there a way?

This is what I did so far, but it doesn't work.


Players:1, 2 , 3

Conditions: Kill Score for current player is exactly 10

Actions:
Modify resources for current player add 5 ore
Preserve trigg

-----------------------------------------------------------

Players: 1, 2 , 3

Condtitions: Kill score for current player is atleast 20

Actions:
Modify kill score for current player subtract 20
Create 1 Terran Civ at location X
Preserve Trigg
---------------------------------------------------------

But this however doesn't work lol. Every time I get a kill, it creates like 5 terran civilians at location X for me. So how do I do what I'm trying to do? lol ty
-$

Post has been edited 3 time(s), last time on Jun 16 2009, 6:08 pm by m.0.n.3.y.



None.

Jun 15 2009, 7:47 pm Vrael Post #2



Using death counts is probably the easiest way. When using hyper triggers, SC checks the trigger list approximately 12 times per second, so we use this as the basis for our timing. Say we want to add 2 gas every 3 seconds, it would look something like this:

Trigger("Player 1"){
Conditions:
Player 1 has suffered exactly 0 deaths of "Death Count Unit"
Actions:
Add 2 gas for Player 1
Set to 36 for deaths of "Death Count Unit" for Player 1 (The 36 deaths is 3 seconds, 3*12deaths/sec)
Preserve Trigger
}

Trigger("Player 1"){
Conditions:
Player 1 has suffered at least 1 deaths of "Death Count Unit"
Actions:
Subtract 1 deaths of "Death Count Unit" for Player 1
Preserve trigger
}



None.

Jun 15 2009, 7:56 pm m.0.n.3.y Post #3



See, that's almost exactly what I did and it doesn't work.
Ok so the player has control of 1 Aldaris (Templar), and here are the triggers I used:

Players: 1

Conditions:
Always

Actions:
Modify deaths for current player: Set to 36 for Duke Turret

---------------------------------------------------------------------
Players:1

Conditions:
Current Player has suffered atleast 1 death of Duke Turret

Actions:
Modify death for current player: Subtract 1 for Duke Turret
Preserve Trigger
-------------------------------------------------------------------------
Players: 1

Conditions:
Current player has suffered exactly 1 deaths of Duke Turret

Actions:
Modify resources for current player Add one Gas
Modify Death counts for current player set to 36 for Duke Turrett
Preserve Trigger



None.

Jun 15 2009, 8:07 pm JaFF Post #4



Quote from m.0.n.3.y
Players: 1

Conditions:
Always

Actions:
Modify deaths for current player: Set to 36 for Duke Turret

---------------------------------------------------------------------
Players:1

Conditions:
Current Player has suffered atleast 1 death of Duke Turret

Actions:
Modify death for current player: Subtract 1 for Duke Turret
Preserve Trigger
-------------------------------------------------------------------------
Players: 1

Conditions:
Current player has suffered exactly 1 deaths of Duke Turret

Actions:
Modify resources for current player Add one Gas
Modify Death counts for current player set to 36 for Duke Turrett
Preserve Trigger
These triggers have no errors. Either you didn't copy them from the trigedit correctly or some other triggers are breaking your system.



None.

Jun 15 2009, 8:11 pm Pigy_G Post #5



There are two Duke Turrets, make sure its the same DC.



None.

Jun 15 2009, 8:12 pm sharf Post #6



Actually there is an error.
The trigger is "at least 1, remove 1" the trigger that detects exactly 1 will not detect it in time. Usually this instance will cause it fire sometimes, and not all times, especially with hyper triggers, set the condition "exactly 1" to "exactly 0"



None.

Jun 15 2009, 8:14 pm m.0.n.3.y Post #7



Quote from Pigy_G
There are two Duke Turrets, make sure its the same DC.
No, i'm using the same duke turret because I renamed it DC Mana...But maybe there is another trigger blocking it or something...ill check



None.

Jun 15 2009, 8:15 pm Falkoner Post #8



Quote
The trigger is "at least 1, remove 1" the trigger that detects exactly 1 will not detect it in time. Usually this instance will cause it fire sometimes, and not all times, especially with hyper triggers, set the condition "exactly 1" to "exactly 0"

No, it will detect it, it's only issues involving units that have slow updating, not Death Counts. I think it's a problem with the multiple Duke turrets.



None.

Jun 15 2009, 8:16 pm sharf Post #9



do what i said and it will work.



None.

Jun 15 2009, 8:21 pm m.0.n.3.y Post #10



Lol, ok guys mb. I fixed it. There was indeed another hidden trigger that was blocking it. Sorry about that, but thanks for your help everyone. But while I've got the post I have one more question...

So I have a location constantly following my guy, and then when he dies, a crystal is supposed to be moved into the location. And this works all fine and dandy, but when my guy dies, the location that is following him goes to the center of the map. It just moves there by itself. How do I prevent this from happening?



None.

Jun 15 2009, 8:22 pm sharf Post #11



You have it set to conditions - "always" and when there is no unit to move it to, it will go to the center. set the condition to "player commands at least 1 of (unit)"



None.

Jun 15 2009, 8:23 pm BiOAtK Post #12



Make the move trigger have a condition that the guy is alive.



None.

Jun 15 2009, 8:24 pm l)ark_ssj9kevin Post #13

Just here for the activity... well not really

I'm assuming the trigger is something like:
Always

Center location on Hero

Change it to:
Command one Hero

Center location on Hero

Bah, double ninja'd'd.



guy lifting weight (animated smiley):

O-IC
OI-C

"Oh, I see it"


Jun 15 2009, 8:31 pm Falkoner Post #14



You need to be careful about that though, because sometimes the Bring/Command conditions won't update in time to realize that the unit actually dead, so make sure you have a trigger before that one that always moves a location, kills/removes a unit, or any other actions that update the Bring/Command conditions.



None.

Jun 15 2009, 9:18 pm Vrael Post #15



What I do, is use the death count for that unit. To center the location on him, something like this:

Conditions:
Current player has suffered exactly 0 deaths of "Unit"
Actions:
Center Location labeled "Unit Location" on Unit owned by Current Player at "Anywhere"
Preserve trigger

That way, as soon as he dies the trigger will not fire, and the location you mean will not be moved to "anywhere," which happens to be the center of the map.



None.

Jun 16 2009, 7:45 am m.0.n.3.y Post #16



Quote from m.0.n.3.y
See, that's almost exactly what I did and it doesn't work.
Ok so the player has control of 1 Aldaris (Templar), and here are the triggers I used:

Players: 1

Conditions:
Always

Actions:
Modify deaths for current player: Set to 36 for Duke Turret

---------------------------------------------------------------------
Players:1

Conditions:
Current Player has suffered atleast 1 death of Duke Turret

Actions:
Modify death for current player: Subtract 1 for Duke Turret
Preserve Trigger
-------------------------------------------------------------------------
Players: 1

Conditions:
Current player has suffered exactly 1 deaths of Duke Turret

Actions:
Modify resources for current player Add one Gas
Modify Death counts for current player set to 36 for Duke Turrett
Preserve Trigger

Ok so another question, if I want to use this trigger for 3 players, can I select all the players for the 1 trigger?
For example, can I do this?

Players: 1 , 2 , 3

Conditions:
Always

Actions:
Modify deaths for current player: Set to 36 for Duke Turret

And do this with all the triggers? That is, using players 1, 2 and 3 in all the triggers. If I do this, will each player recieve the same amount of gas at the same amount of time?



None.

Jun 16 2009, 7:48 am Vrael Post #17



Yes. As long as you use "Current Player" for everything.



None.

Jun 16 2009, 5:29 pm m.0.n.3.y Post #18



Thanks Vrael. Alright but now I have one more question lol.
Ok so how would I make it so that every 10 kills the player gets 5 ore, and that every 20 kills the player gets 1 terran civilian at location X. Here's what I did.

Players:1, 2 , 3

Conditions: Kill Score for current player is exactly 10

Actions:
Modify resources for current player add 5 ore
Preserve trigg

-----------------------------------------------------------

Players: 1, 2 , 3

Condtitions: Kill score for current player is atleast 20

Actions:
Modify kill score for current player subtract 20
Create 1 Terran Civ at location X
Preserve Trigg
---------------------------------------------------------

But this however doesn't work lol. Every time I get a kill, it creates like 5 terran civilians at location X for me. So how do I do what I'm trying to do? lol ty

-$



None.

Jun 16 2009, 5:48 pm Falkoner Post #19



Kill scores actually are different than Kills, each unit has their own score, here's the list of kill scores: http://www.staredit.net/?p=tutorials&tut=6



None.

Jun 16 2009, 5:52 pm m.0.n.3.y Post #20



Alright cool, thanks falkoner. So do I just have to use these kill scores and what not or is there a way to say,
When This player kills 20 Units, Create 1 Civilian At location X

Ok so then, how do I create a repeatable system where when someone kills 20 units, it creates 1 terran civilian for them. But how do I do this so I only have to use like 3 triggers, instead of repeating the same trigger over and over.

Ex: I dont want to do this.
Current player kills 40 Units, etc. etc.
Current player kills 60 Units, etc. etc.
Current player kills 80 Units, etc. etc.

However, I just want to do this system with like 3 triggers, is there a way?

Post has been edited 1 time(s), last time on Jun 16 2009, 6:07 pm by m.0.n.3.y.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[04:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[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
[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.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
Please log in to shout.


Members Online: RIVE, zsnakezz, kalieestes