How do I count the kills of a player?

dead-manakin

New Member
Reaction score
5
I want to make it so that when a player (red,blue,teal, so on...) Kills some other unit (neutral hostile). A integer variable goes up. Taht variable would be my kill count. How do I trigger this?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
First, create a new Integer variable with an array (Called "KillCount" in the trigger below ;)).
Then, create a trigger with the event "A unit Dies" and add the conditions:
Trigger:
  • (Killing unit) is A hero Equal to True
    • (Triggering unit) belongs to an enemy of (Owner of (Killing unit))


And then use this action:
Trigger:
  • Set KillCount[Player number of (Owner of (Killing unit))] = (KillCount[Player number of (Owner of (Killing unit))] + 1)


And there you have it, now the variable "KillCount[<Insert player number here>]" will be the container of the amount of kills :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top