Kill count for a specific unit of type

eatbeaver

New Member
Reaction score
7
Hi, i want a intreger that count kill for all unit of a type. Its a tower and i'm not sure how to do it.

Example: Player 1 red bulids a tower that kills 3 enemys. Then he bulids an ahoter tower of the same type that kill 1 enemy. The tower need 5 kills to upgrade. How to seperate all the towers?
 

shinami

Redirect your complaints to the nearest wall
Reaction score
47
Using custom values?

Example:

this is hand written so yeah its crappy.

E:
unit kills a unit.
C:
Killing unit equal to Yourunit
A
Set custom value of killing unit (custom value +1) ( i think thats how it's dont,cant see in we now )
if then else
if:
custom value of unit equal to 5
then:
remove killing unit
add Yourunit

Like i said i can't get to we right now, so i'm not sure if this is correct. Also i don't know if you can do it with integers, since i dont really see the diffrence in doing this with integers, or with custom values.
 

eatbeaver

New Member
Reaction score
7
Thanks i will try that out!

EDIT:

custom value of unit equal to 5

What is that for condition?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top