Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you address whether a player has killed 2/3/4 players or not and play sounds accordingly?

Asked by
Naaami 0
8 years ago

I'm very troubled in forming a script where:

  1. when a player kills one player, nothing happens
  2. when a player kills two players, it plays a certain sound (ex. "double kill" sound-effect)
  3. when a player kills three players (in under no specific time frame), a different distinct sound plays (different from killing two players, such as a "triple kill" sound-effect)

My main concern, I suppose, is how to address if whether a player has killed 2/3/4 players or not. Any ideas on how this may be accomplished? I think this might be far too complex, so, I thought maybe it would be easier to apply this script onto a sword where if the sword comes into contact with a player (it increases a sort of kill-counter by 1) and if said counter reaches 2 kills, it plays 'sound#2'? I've been leaning more towards this route, but how might this even be achieved? Each of the swords counters would be independent from each other and each sword would need to count a kill as just one kill and no more than one if the sword were ever to touch the same dead body somehow more than once (I'd be using a 1-hit ko sword but still). I think in this situation, you get a script where it tags an individual? Any help or guidelines would be strongly appreciated.

Answer this question