Hello again,
Got another question for all of you, hope you can help.
I am making a hero-type map, and one of the things I would like to track is the number of times a player has killed another enemy hero.
All of the minions are zerglings, so whenever a player kills an opposing hero (anything non-zergling), it should increase the death counter on a Terran Ghost.
The problem is that it infinitely adds to the counter upon killing someone, instead of just adding 1.
Here is an example trigger:
(Player 1)
-Conditions-
Player 1 kills at least 1 Terran Marine
-Actions-
Modify Death count for player 7: Add 1 for Terran Ghost.
Preserve trigger
And then just a simple wav player:
(All players)
-Conditions-
Player 7 has suffered at least 3 deaths of Terran Ghost
-Actions-
play 'killingspree.wav"
What happens is that upon player 1 killing a terran marine, the counter continues to rise to infinity, Playing all of the "Dominating, Rampage, etc. sound effects." right after one another, even though they all require a different number of deaths on the terran ghost to actiivate.
Thanks for any help you can provide!
None.
Kill counts cannot be modified. What can be modified is
kill score. Use the following:
Conditions:
- Current player kill score is at least 51 (A Zergling's kill score is 50, so anything over 51 = hero).
Actions:
- Modify death counts for current player: add 1 for Terran Ghost.
- Modify kill score for current player: Set to 0.
- Preserve Trigger.
Conditions:
- Current player kill score is at most 50.
Actions:
- Modify kill score for current player: Set to 0.
- Preserve Trigger.
The second trigger causes the system to ignore zergling kills.
There is a problem with this. If any units are killed simultaneously, it will count as one kill instead of two. There is a solution, but it's more complicated and you may not want to bother:
Kills to Cash and
Kills to Cash Perfect. The second one can get around the simultaneous death problem, but you really should read the whole article.
None.
The reason your trigger counts to infinity is that you have preserved them.
Player has killed "at least 1" marine will always return true as soon as they kill 1 marine, so you add 1 to P7 score. Then the next trigger cycle, they have still killed "at least 1" marine, so it returns true and 1 is added to P7 score.
The fix is to remove the 'preserve trigger' from your actions.
None.
Why don't you just play killing spree once when the player has 3 kills? Kills to cash (DCs are the "cash") will work as well.
You can also detect killed at least 1, 2, 3, 4, 5, .... 9999 kills of zergling non-preserved for a "perfect" system up until you pass 9999 kills. The problem is that it takes up 9999 triggers.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
Thanks a lot for your help!
Just one more question, since it is kind of related
I have seen several maps that would allow you to upgrade zerg carapace and stuff like that almost thirty times, but I can't find option in staredit to allow me to make it so high. I'm sure the option is in here somewhere, I'm just blind.
Thanks again.
None.
In the upgrade settings screen, the 4th boxes down is Start Level / Max Level for upgrades. By default the max is 3, but you can set this to 30. You can change it individually for different players if you want, too. The Upgrade Factor boxes above for minerals/gas/speed indicate how much each additional upgrade will cost, so if you set it to 20 for minerals, the first upgrade might cost 100, then 120, then 140 etc.
Note that modal upgrades such as zealot/shuttle/observer/etc speed make no difference if you set a max value other than 1 to them; eg you cannot make a superfast zealot by upgrading legs 2+ times. Only the weapon, armor and protoss shield upgrades allow multiple upgrades. Notably the reaver damage upgrade also allows multiple upgrades if you set a max value other than 1. To disable players from researching certain upgrades, set your max upgrade level to the same as your start upgrade level (typically 0, but you could set them both to 5 for example).
None.
You want to use SCMDraft, or some other extended map editor. Staredit limits what you can do by a lot. The latest version of SCMDraft can be found here:
http://www.staredit.net/topic/8307/If you do end up making a lot of triggers (like from 1 to 9999), you don't have to manually do it. There are trigger duplicators which will do it for you. Check the DLDB (under starcraft->database->search for duplicator).
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"