21ToWin
New Member
- Reaction score
- 5
How do I count the number of a dead unit type with an integer?
I'm not good with integers lol.
I'm not good with integers lol.
Creep Death Count Copy
Events
Unit - A unit Dies
Conditions
Actions
Set Dead_Creeps = (Dead_Creeps + 1)
Event -
A unit dies
Conditions -
Actions -
Set (Your Variable) to ((Your Variable) + 1)
Trigger Run - Run Trigger Y checking conditions
Trigger Y
Event -
Conditions - (Your Variable) is greater than or equal to (#)
Actions -
Whatever you're planning
I got the integer stuff working right but now i have a big problem. I'm using this for a TD.
Whenever a creep dies the Dead_Creep integers gets + 1.
But the game cant seem to count all the creeps dieing.
When 240 creeps died the integer only goes up to 142.
How can I fix this?
If the units are dieing too fast for the integer to tally, what is another more efficient way to keep track of the number of a dead unit type?