Triggers In Starcraft
-
jster21727
- Terran Academy Dropout (Stim Pack scandal)

- Posts: 9
- Joined: Sat Jun 26, 2010 3:30 pm
Triggers In Starcraft
Sorry if this sounds noobish I just never used these triggers before. But what does a Hangar Count do? Also in the leader boards trigger I can see "greed" what is that exactly? Sorry if I'm being a noob or if there is a place I can look this up.
- Lavarinth
- Xel'naga Administrator

- Posts: 6539
- Joined: Wed Aug 16, 2006 5:21 pm
- Location: His Ashworld Planet
Re: Triggers In Starcraft
I'm not all too sure how Greed is calculated- nor was I aware there was a Hangar Count trigger for SC, but I'm going to safely assume it's relative to how many units are in a transport. (Example: Hanger count is at least 4 Marines)
- - Lavarinth
Campaign Creations Administrator
Campaign Creations Administrator
-
jster21727
- Terran Academy Dropout (Stim Pack scandal)

- Posts: 9
- Joined: Sat Jun 26, 2010 3:30 pm
Re: Triggers In Starcraft
Oh right. I think the hangar count's for that. Thanks, also i'm making an rpg game and i'm creating a level up system. Is there any way I can erase or reset how many times "player 1" has killed a specific unit of "player 2's"? For example, "player 1" recieves 5 exp. for killing a marine. I can't put "preserve trigger" without it nonstop adding 5 points for just one kill. I want it so everytime he kills one marine he gets 5 points.
- AngelSpirit
- Terran Goliath Dome Polisher

- Posts: 122
- Joined: Tue Jun 23, 2009 7:18 am
- Contact:
Re: Triggers In Starcraft
Not directly, no.
And also, Lav is wrong. Hangar count applies only to Carriers/Reavers(and their hero counterparts Warbringer and Gantrithor). It refers to the number of Interceptors/Scarabs they are currently holding.
And also, Lav is wrong. Hangar count applies only to Carriers/Reavers(and their hero counterparts Warbringer and Gantrithor). It refers to the number of Interceptors/Scarabs they are currently holding.
Shameless plug: Dwarf Fortress!Lavarinth wrote: You top the charts. Congratulations, to the OFFICIAL FORUM IDIOT, 1N73RC3P70R.
-
jster21727
- Terran Academy Dropout (Stim Pack scandal)

- Posts: 9
- Joined: Sat Jun 26, 2010 3:30 pm
Re: Triggers In Starcraft
Mmm makes sence. do you have any suggestion on how I could make a level up system that doesn't depend on how many units you kill but more of exp. gaining. Thank you
- AngelSpirit
- Terran Goliath Dome Polisher

- Posts: 122
- Joined: Tue Jun 23, 2009 7:18 am
- Contact:
Re: Triggers In Starcraft
Be more specific. I'll assume you want said exp to be gained through kills, yes?
...doesn't depend on how many units you kill but more of exp. gaining.
Shameless plug: Dwarf Fortress!Lavarinth wrote: You top the charts. Congratulations, to the OFFICIAL FORUM IDIOT, 1N73RC3P70R.
-
jster21727
- Terran Academy Dropout (Stim Pack scandal)

- Posts: 9
- Joined: Sat Jun 26, 2010 3:30 pm
Re: Triggers In Starcraft
I want someone to gain 4 exp. for killing one marine. After they can kill another marine and get another 4 exp.
I made a trigger like this.
CONDITIONS:
- Current player kills at least 1 Marine.
ACTIONS:
- Modify score for Current player: Add 4 Custom. (Custom representing exp.)
- Preserve Trigger.
When I put preserve trigger there it adds 4 custom points nonstop just for killing 1 marine. If I didnt put preserve trigger there then killing one marine would give you 4 exp and that would be fine, but if they kill another they dont recieve any more exp. I would have to make triggers having to say
CONDITIONS:
- Current player kills exactly 1 Marine.
CONDITIONS:
- Current player kills exactly 2 Marine.
CONDITIONS:
- Current player kills exactly 3 Marine.
and so on. I would like an easier way of doing that.
I made a trigger like this.
CONDITIONS:
- Current player kills at least 1 Marine.
ACTIONS:
- Modify score for Current player: Add 4 Custom. (Custom representing exp.)
- Preserve Trigger.
When I put preserve trigger there it adds 4 custom points nonstop just for killing 1 marine. If I didnt put preserve trigger there then killing one marine would give you 4 exp and that would be fine, but if they kill another they dont recieve any more exp. I would have to make triggers having to say
CONDITIONS:
- Current player kills exactly 1 Marine.
CONDITIONS:
- Current player kills exactly 2 Marine.
CONDITIONS:
- Current player kills exactly 3 Marine.
and so on. I would like an easier way of doing that.
- Lavarinth
- Xel'naga Administrator

- Posts: 6539
- Joined: Wed Aug 16, 2006 5:21 pm
- Location: His Ashworld Planet
Re: Triggers In Starcraft
I'm pretty sure using switches would great ease your triggering.
- - Lavarinth
Campaign Creations Administrator
Campaign Creations Administrator
- New-/Hydrolisk
- Terran Factory Worker

- Posts: 54
- Joined: Wed Apr 14, 2010 3:05 pm
Re: Triggers In Starcraft
The most basic way of doing this is:
--Cond's:
Current player has at least 1 kill of [_].
--Act's:
Preserve trigger.
Modify current player's kills: set to 0. // IIRC, you can only modify a player's kill scoure through "set to".
Modify current player's custom score: add 1.
Thus, whenever the player has made a kill, that kill is discounted by SC (in a way; the unit still has the +1 to its kill counter), and then SC will add 1 to the player's score.
However, that basic trigger can be exceptionally inaccurate if you're not using hyper triggers to make SC run triggers super fast. Additionally, if a player gets multiple kills in a single trigger cycle, they would be short-changed for their kills. This means that if the player is using an Archon and killed two Zerglings at the same time, the player would still only receive +1 to their custom score.
With hyper triggers, since the trigger cycle is so fast, if the player happens to kill multiple units very quickly but not simultaneously, there is less of a chance for the reward to be less than it should be. However, even with hyper triggers, there will be discrepancies when killing units at the exact same time.
MORE INFORMATION:
http://www.staredit.net/starcraft/Kills_to_cash // This one and the below should be more or less the same. Kills to cash (or other).
http://www.staredit.net/wiki.php?article=Kills_To_Cash // This one and the above should be more or less the same. (Included both in case they mentioned something the other did not.)
http://www.staredit.net/starcraft/Death_counters // Death counters, which are incredible assets for any map maker.
http://www.staredit.net/starcraft/Hyper_triggers // Another incredibly common asset for the map maker.
I warn you that I'm quite a newbie at SC mapping myself, so I'm not sure how much I can help besides finding the right articles and for you to read and comprehend. The articles I have provided provide much more information.
--Cond's:
Current player has at least 1 kill of [_].
--Act's:
Preserve trigger.
Modify current player's kills: set to 0. // IIRC, you can only modify a player's kill scoure through "set to".
Modify current player's custom score: add 1.
Thus, whenever the player has made a kill, that kill is discounted by SC (in a way; the unit still has the +1 to its kill counter), and then SC will add 1 to the player's score.
However, that basic trigger can be exceptionally inaccurate if you're not using hyper triggers to make SC run triggers super fast. Additionally, if a player gets multiple kills in a single trigger cycle, they would be short-changed for their kills. This means that if the player is using an Archon and killed two Zerglings at the same time, the player would still only receive +1 to their custom score.
With hyper triggers, since the trigger cycle is so fast, if the player happens to kill multiple units very quickly but not simultaneously, there is less of a chance for the reward to be less than it should be. However, even with hyper triggers, there will be discrepancies when killing units at the exact same time.
MORE INFORMATION:
http://www.staredit.net/starcraft/Kills_to_cash // This one and the below should be more or less the same. Kills to cash (or other).
http://www.staredit.net/wiki.php?article=Kills_To_Cash // This one and the above should be more or less the same. (Included both in case they mentioned something the other did not.)
http://www.staredit.net/starcraft/Death_counters // Death counters, which are incredible assets for any map maker.
http://www.staredit.net/starcraft/Hyper_triggers // Another incredibly common asset for the map maker.
I warn you that I'm quite a newbie at SC mapping myself, so I'm not sure how much I can help besides finding the right articles and for you to read and comprehend. The articles I have provided provide much more information.
-
jster21727
- Terran Academy Dropout (Stim Pack scandal)

- Posts: 9
- Joined: Sat Jun 26, 2010 3:30 pm
Re: Triggers In Starcraft
thank you guys so much, helped me get back to completing my map
thanks again
-
jster21727
- Terran Academy Dropout (Stim Pack scandal)

- Posts: 9
- Joined: Sat Jun 26, 2010 3:30 pm
Re: Triggers In Starcraft
How do switches work in sc editor? I think I could use it.Lavarinth wrote: I'm pretty sure using switches would great ease your triggering.
- Meta
- Xel'naga World Shaper

- Posts: 431
- Joined: Sat May 19, 2007 3:21 am
- Location: Belo Horizonte, Brazil
Re: Triggers In Starcraft
As hydrolisk said, there's a death counter somewhere; set it to zero after adding custom score and you're pretty much set. I used it to make a "loot" system in some of my maps and it worked wonders, giving resources every time an enemy unit died.
Switches are basically boolean variables, they're either "set" or "clear". All of them start the game as "clear", so as you toggle their states you can make the more complex triggers in SC.
Switches are basically boolean variables, they're either "set" or "clear". All of them start the game as "clear", so as you toggle their states you can make the more complex triggers in SC.
-
jster21727
- Terran Academy Dropout (Stim Pack scandal)

- Posts: 9
- Joined: Sat Jun 26, 2010 3:30 pm
Re: Triggers In Starcraft
Could you give an example of this trigger please? Thank youMeta wrote: As hydrolisk said, there's a death counter somewhere; set it to zero after adding custom score and you're pretty much set.
- AngelSpirit
- Terran Goliath Dome Polisher

- Posts: 122
- Joined: Tue Jun 23, 2009 7:18 am
- Contact:
Re: Triggers In Starcraft
There's no trigger to set kills. Set deaths, yes, but not kills.New-/Hydrolisk wrote: The most basic way of doing this is:
--Cond's:
Current player has at least 1 kill of [_].
--Act's:
Preserve trigger.
Modify current player's kills: set to 0. // IIRC, you can only modify a player's kill scoure through "set to".
Modify current player's custom score: add 1.
I.E. You cannot change the amount of times Player X has killed a unit.
This is a working solution:
Every time a player kills a unit, he gains kill score. You may have seen this score at the end of a game, where the scoreboard is displayed. To put it simply, you can detect this kill score and take appropriate action.
Different units give different kill scores, therefore, with reasonable accuracy, you can detect which unit was killed.
Assume you want to detect kills of a marine.
TRIGGER
Conditions:
[Current Player] kill score is [exactly] [50].
Actions:
Modify score for [Current Player]: [set to] 0 [kills].
* Any other actions you wish to do, such as adding EXP, go here.
Preserve Trigger.
Shameless plug: Dwarf Fortress!Lavarinth wrote: You top the charts. Congratulations, to the OFFICIAL FORUM IDIOT, 1N73RC3P70R.