Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Kill tracking to play wav files
Kill tracking to play wav files
Feb 13 2010, 12:35 am
By: darkeye123  

Feb 13 2010, 12:35 am darkeye123 Post #1



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.

Feb 13 2010, 1:04 am ImagoDeo Post #2



Kill counts cannot be modified. What can be modified is kill score. Use the following:

Quote
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.

Quote
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.

Feb 13 2010, 1:17 am Lanthanide Post #3



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.

Feb 13 2010, 1:27 am rockz Post #4

ᴄʜᴇᴇsᴇ ɪᴛ!

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?"

Feb 13 2010, 1:47 am darkeye123 Post #5



Thanks a lot for your help!

Just one more question, since it is kind of related :P

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.

Feb 13 2010, 2:51 am Lanthanide Post #6



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.

Feb 13 2010, 9:16 am rockz Post #7

ᴄʜᴇᴇsᴇ ɪᴛ!

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?"

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:27 am]
m.0.n.3.y -- Maybe because it's an EUD map?
[03:27 am]
m.0.n.3.y -- Can't upload maps to the DB. Error says "The action you have performed caused an Error". Any word?
[2024-4-25. : 7:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
Please log in to shout.


Members Online: Roy