Hello, I am new to this site, please bare with me.
You know how in Starcraft you can see each individual units killing blows? Each unit in the game keeps track of their own personal kills.
I would like to create a system that would replicate this and take it a step further in Warcraft 3.
When a unit reaches a specified kill count they could gain abilities or stats. Such as, gaining 1 armor and 3 damage at 5 kills.
The idea I had in my head is; each unit I want to keep track of could have a custom ability. Adopting the military rank system, it would be called "Private" and it would represent 0 kills. Once they reach 5 kills, this ability in their command card would be replaced with "Sergeant" and they would gain some stats or an ability. This would be accomplished by using the spellbook ability for each rank and inside the spellbook would be the actual stats or abilities so it doesn't clutter each units command card.
I found a similar thread here, however I will need to do some heavy modifications. Some of the modifications I'm not sure about are the following:
In my map I'm going to have 200~ish units up at a time. I'm going to be excluding a good portion of those since they will be under AI control, however when a unit dies I wondered if I need to remove them from the hashtable. Surely the hashtable can only store so much data without slowing down. It'll reach a thousand by the end of the game I'm sure. I'm not positive on how to code this or if its even necessary. I've never done work with custom script before and my experience with hashtables is small. Additionally, i'm not really sure how to clear leaks. The unit group command in the map from that thread won't be executed since no units will be up at map initialization. Should I keep bj_wantDestroygroup=True? I was wondering if someone more experienced could help me polish these triggers since I'm a little out of my league.
As for conditions (such as excluding the AI) and implementing those same triggers with modifications-- i'm confident I'll have no issues minus the things stated above. I'd appreciate it if you could humor a noob and help out his first project.
You know how in Starcraft you can see each individual units killing blows? Each unit in the game keeps track of their own personal kills.
I would like to create a system that would replicate this and take it a step further in Warcraft 3.
When a unit reaches a specified kill count they could gain abilities or stats. Such as, gaining 1 armor and 3 damage at 5 kills.
The idea I had in my head is; each unit I want to keep track of could have a custom ability. Adopting the military rank system, it would be called "Private" and it would represent 0 kills. Once they reach 5 kills, this ability in their command card would be replaced with "Sergeant" and they would gain some stats or an ability. This would be accomplished by using the spellbook ability for each rank and inside the spellbook would be the actual stats or abilities so it doesn't clutter each units command card.
I found a similar thread here, however I will need to do some heavy modifications. Some of the modifications I'm not sure about are the following:
In my map I'm going to have 200~ish units up at a time. I'm going to be excluding a good portion of those since they will be under AI control, however when a unit dies I wondered if I need to remove them from the hashtable. Surely the hashtable can only store so much data without slowing down. It'll reach a thousand by the end of the game I'm sure. I'm not positive on how to code this or if its even necessary. I've never done work with custom script before and my experience with hashtables is small. Additionally, i'm not really sure how to clear leaks. The unit group command in the map from that thread won't be executed since no units will be up at map initialization. Should I keep bj_wantDestroygroup=True? I was wondering if someone more experienced could help me polish these triggers since I'm a little out of my league.
As for conditions (such as excluding the AI) and implementing those same triggers with modifications-- i'm confident I'll have no issues minus the things stated above. I'd appreciate it if you could humor a noob and help out his first project.