Tutorials
Programs Maps Legal Info
Other Sites
Death Counts
Death Counts are the variables of StarCraft. There is an almost endless supply of them and they allow you to perform many advanced map making techniques, a good map almost always has Death Counts and this tutorial will show you how to use them.
Contents
Death Counts Info
Death Count Timers
Death Count Randomization
Death Count Switches
Death Count Transfers
Death Counts Info
Each unit for each player in StarCraft has a Death Count, there are about 200 units for each player, including Unused Units. making a total of about 1600 units are usable as Death Counters, although you may want to mainly use Unused Units for Death Counters since they will probably not be killed in your map, and so their Death Count will not get thrown off by being killed. Death Counts can be detected, added to, subracted from, or set to a specific number. This is why they make such great variables to transfer numbers in StarCraft such as minerals, vespane, or even units.
Only players 1-8 can have their Death Counts changed through triggers, players 9-255 cannot have their Death Counts changed using triggers. A Death is added to a unit when it is killed and only to the person who suffered the Death. Death Counts can be used in many ways, as timers, for Randomization, even as data storage. They are extremely handy.
Death Count Timers
Death Counts can be used as invisable timers. It's simply just figuring out how often the triggers conditons are checked. So, if you have Hyper Triggers and you are playing in Fastest, triggers will be checked 11.8 times per second. If you are on Fastest without Hyper Triggers, it is once about every 1.5 seconds. So I'm going to use Hyper Triggers, my first one will constantly subract a Death Count, you can also add a Death Count, but subracting works just as well. Here's how it looks.
Next trigger detects when the Deaths hit 0 then it resets it and does whatever actions I want, see how it looks below.
If you want it to repeat just add a Preserve Trigger. The difference between the addition method and the subraction method is that unless you specially make a trigger to set it high at the beginning of the game, subraction will do the actions immediately, while additon will not.
Death Count Randomization
Okay, for Randomization you want to make a timer like you saw above, and for however many outcomes you want you add a Death Count. So shown below is for 8 outcomes.
Make sure that you have your triggers in the right order, or your last outcome will never come around, as you can see now it will count from 8-1, then it will go to 0, but immediately go back to 8, so 0 is not one of the outcomes, only 1-8 are. Now just make a trigger for each outcome, add whatever actions you want and just have a condition for  each possible outcome, like you see below,
Just continue that pattern until you have done all of them, combine this with Hyper Triggers and it will be totally random, but if you don't have Hyper Triggers and they continually do the Randomization they will see a pattern.
Death Count Switches
Death Counts can also be used as Switches, you can set them to 1 instead of setting a switch, or back to 0 instead of cleared. You can also add to them rather than setting multiple switches, so if you wanted to go through steps you could add 1 Death per step rather than setting multiple switches, this allows you to save on deaths, and deaths also do not take up strings, making them a great replacement for switches.
Death Count Transfers
Death Counts can be used to transfer or store other variables, such as minerals, they can even be used to multiply, divide, add, or subract the other variables. Like for multiplication you would just make it so that for every mineral they have you give them 2 Death Counts and then remove 1 mineral, once they are out of minerals, then you give them one mineral for every Death Count and now they are doubled, combine this with Hyper Triggers and use Binary Count-Offs to speed it up and it will seem instantaneous.

Hope this tutorial helped!
Death Count Test Map
Download
To return to top of page