![Table of contents [*]](/skins/2/images/wiki_toc.png)
Kills To Cash
This article shows various methods of rewarding a player for killing units. Each of the methods described has uses in certain map making situations. Score Method 1: Reward for killing any unitWhen a unit or building is killed, a player earns a fixed amount of kill score points. A list of unit kill scores can be found here.This score can be detected with the "Score" condition, using "Kills", "Razings", or "Kills and Razings". (When a building is killed, the points go to Razings instead of to Kills.) The following trigger will reward a player with one mineral when it executes and they have killed at least one unit. This method could potentially work flawlessly if it were used in the right situation, but it does have a few problems. A player can kill multiple units between trigger cycles (Example: Splash damage kills two units at once) If this happens, the trigger will still only give the player one mineral. Also, there are many different kinds of units that the player could kill. With this method the player will recieve the same reward regardless of what type of unit he kills. Recommendations for using this method:
Score Method 2: Reward based on amount of kill score earnedThis method will reward the player with one mineral for every 25 kill score points they earn.Keep in mind that some units will give the player more minerals than others. Killing an Infested Kerrigan will give the player 4000 kill score, whereas killing a Broodling will only give them 25 kills score. Or, from the players perspective, killing Infested Kerrigan is worth 160 minerals while killing a Broodling is worth only 1. If the players are able to kill many units in a short period of time, the triggers may not be able to reward them fast enough. See below for ways to reduce this possibility. Recommendations for using this method:
Score Method 3: Reward based on type of unit killedIn this method you will make one trigger for each unit that can be killed. You will be able to choose the reward amount that each unit gives.In this example, there are only three types of units that can be killed. Broodlings, Hydralisks, and Infested Kerrigan. This method will not be able to distinguish between units that give the same amount of kill score. If a player kills multiple units at once they may recieve the wrong reward. Recommendations for using this method:
Rewards with individual triggersIn this method, the "Kills" condition is used to detect when a player has killed a unit. The kills used by the "Kills" condition are the amount of units killed, rather than the score of the units killed, as was used in the previous method.This condition makes it very easy to detect exactly what unit the player has killed and reward him for it, but there is a problem. The number of kills cannot be set. In order for this method to be useful, a large series of triggers will need to be made to detect when a unit is killed. Imagine a map with 3 zerglings. When a player kills a zergling he should be rewarded with a mineral. Using this method, the following 3 triggers will be necessary for this to work. Should you use "Preserve Trigger" on these triggers, it will constantly fire, since no trigger action can modify the fact that the player killed 1 Zergling. If there is no limit on how many kills the player can make in the map, using this method may not be the best way to do kills to cash. There are trigger duplication programs available to speed up the creation of large sets of these type of kills to cash triggers. See the files page for trigger duplicators. Recommendations for using this method:
Rewards based on opponent deathsWhen a player kills a unit, their opponent gains one death counter point of the type of the unit killed. For example, if the player kills Zerglings owned by player 8, player 8 will get Zergling death counter points.The "Deaths" condition can be used to detect when a player has killed an enemy unit, and reward him for doing so. The following trigger rewards the player for each player 8 Zergling that is killed. Make sure to use the "Set Deaths" action to remove the death counter point. Recommendations for using this method:
Unit count methodThis method allows for precise individual tracking of kills against the same player, so long as they are separated by location. You need an arena (or several) where units can only enter and exit via triggers, and can only be killed by 1 player. To implement this system, create and constantly maintain a count of actual and expected units in the arena, then award cash whenever the actual unit count is lower than expected. Put the number of actual number of units into a DC, and compare it to the number of expected units using binary countoffs."Perfect" kills to cashThis method is called perfect because it can be used to accurately track kills with relatively few trade-offs.The basic idea behind the entire is system is as follows: There is a computer player, which is the "score keeper", used to detect when a player kills a unit. The Most Kills condition is used to make this work. When the map starts the score keeper is allowed to kill one unit so he has the "most kills". Later, when a player kills a unit, their kills goes up one. When this happens the player now has the "most kills" status as well. (When two players have the same amount of kills they both have the "most kills") A trigger executes for the player with the "most kills" that gives him a reward, and then gives all the other players who didn't get one mineral one kill. This includes the score keeper. (To give the players a kill, an actual unit must be created for them to kill. This is usually done by creating a weak enemy unit near a Photon Cannon that the player controls) Since all of the other players have been given a kill, they should all be even again, except the score keeper who has one more than the players. The computer score keeper needs to have one more kill than the other players. This trigger simply sets a death counter for the computer score keeper. We will use this counter to create units for the players and score keeper to kill. This trigger uses the death counter to create units that will be killed by the players. In your map, you will need an area set aside for your players to kill the units you create. In this example, we have a Photon Cannon for each player which we create an enemy unit beside of. The player's cannons should kill these unit automatically. This is the trigger that detects when a player kills a unit and rewards them for it. The CreateUnit counter is set for all of the other players in order to re-balance the kill amounts. Minerals will only be added as fast as the Most Kills counter is updated, which could be a long time if large numbers of units are killed. Recommendations for using this method:
Sample Maps http://www.maplantis.org/index.php?map=723 Possible ImprovementsThis alternative method does not use Death Counts, and will give a different amount of minerals or other types of rewards for each separate unit type killed. Its fundamental core is the exact same as the one listed above, but since there are several different rewards to be given, a Move Unit trigger replaces the Death Counts. The main benefit of this alternative method is the need for less triggers to achieve the same objective than using Death Counts.Just like the existing Perfect method, this system uses a computer player as the "Leader", who will always have 1 more kill in every type of enemy unit (for simplicity, "Monster") that the human players (for simplicity, "Heroes") will need to kill. Whenever a Hero kills a certain type of Monster, he will have the same number of Kills (not to be confused with Kill Score, which is entirely different) as the Leader does. This is detected through the Most Kills condition (not to be confused with the Score: Kills condition), and we will award that Hero some gold, experience, etc. Now we reset the state of the Perfect KTC system by letting all the Heroes and the Leader -- EXCEPT the Hero who was just awarded -- kill that same Monster unit. The non-trigger parts of this system are also important, since you need to isolate an area to let the Kill Update process be completed. In addition, when the game starts, the Leader will immediately kill 1 of every unit so it will have that +1 Kill advantage. Preparation: Players: Let the Leader be P8 and a Computer, the Monsters are P7 and another Computer, and P1-P4 are Heroes and Human controlled. P1-4 and P8 are unallied with P7. Terrain + Units: all Heroes and the Leader each owns a Photon Cannon. Another damage-dealing unit will also work, but Photon Cannons are an obvious choice because they are stationary, attack both Air and Ground, and are Detectors (in other words, they will kill everything). These Cannons need to be spread apart far enough so that one Cannon cannot be within attacking range of another. Lastly, place 1 of each type of Monster (1 Zergling, 1 Hydralisk, etc.) within range of the Photon Cannon owned by the Leader and set their HP to 1%. Locations: "Moveto" (any size) and "Movefrom" (needs to be big enough to cover many units). "Moveto" can be placed anywhere. "Movefrom" needs to be in an isolated area that also has to be quite big. "Update" is a location that covers all the Photon Cannons mentioned above. Step-by-step Triggers & Explanations: 1) After the map starts for a few seconds and before any trigger runs, the kills are as follows: Leader- 1 Zergling, 1 Hydralisk, etc.; Heroes- 0 Zergling, 0 Hydralisk, etc. Of course, you don't need to use Zerglings or Hydralisks, this is just an example. 2) A Hero kills a Zergling. We'll say it's P3, though this trigger will take care of all of them. Now the kills are as follows: Leader- 1 Zergling, 1 Hydralisk, etc.; P3- 1 Zergling, 0 Hydralisk, etc.; All Heroes except P3- 0 Zergling, 0 Hydralisk, etc. 3) Now we move the newly created Zerglings so they go to each person's Cannon. Each player's kills are still the same as Step 2 until the Cannons attack and kill the Zerglings. 4) After a few seconds, the Kills change to this: Leader- 2 Zergling, 1 Hydralisk, etc.; All Heroes including P3- 1 Zergling, 0 Hydralisk, etc. As you can see, Leader regains his lead, and P1-P4 have the same number of Kills again 5) Repeat the trigger from Step 2) for all other Monster types Recommendations for using this method:
|