- Joined
- Jul 14, 2011
- Messages
- 3,213
Hi!
I'm making a TD where each tower has Experience, Kills and Damage dealt saved in a Hashtable.
I want to display in the multiboard
1- The name of the tower with most kills (With Owner Color).
2- The name of the tower with most experience (With Owner Color)
3- The name of the tower that has dealt more damage (With Owner Color)
4- The number of hostile creeps alive
5- The number of lives left.
I think it's better if I do it as a periodic trigger every 1 second. I don't want to update the kill row everytime a unit dies, and the experience row everytime a tower gets experience, and the damage row everytime a tower deals damage. I think it's lighter to do it as a periodic trigger.
I already know how to display the player color, my main doubt is: How do I know which tower has the most kills, damage, or exp? How do I compare all of them and know which one has the highest value in the slots (indexes) used in the hashtable to save those values into the tower Handle?.
I'm making a TD where each tower has Experience, Kills and Damage dealt saved in a Hashtable.
I want to display in the multiboard
1- The name of the tower with most kills (With Owner Color).
2- The name of the tower with most experience (With Owner Color)
3- The name of the tower that has dealt more damage (With Owner Color)
4- The number of hostile creeps alive
5- The number of lives left.
I think it's better if I do it as a periodic trigger every 1 second. I don't want to update the kill row everytime a unit dies, and the experience row everytime a tower gets experience, and the damage row everytime a tower deals damage. I think it's lighter to do it as a periodic trigger.
I already know how to display the player color, my main doubt is: How do I know which tower has the most kills, damage, or exp? How do I compare all of them and know which one has the highest value in the slots (indexes) used in the hashtable to save those values into the tower Handle?.