Hello!
I have lots of different heroes and abilities on my map. My goal is to make certain heroes to learn certain abilities at certain levels, so I thought it might be a good idea to store unit types and level-ability pairs into an array of some kind. The ideal structure is like this:
So basically any number of ability-level pairs can be linked to a unit type, and all these <unit type>-<level-ability pair list> pairs are listed in an array. This would be easier in vJASS since it has structs, but I prefer using the original world editor. So, should I use hashtable for this or is there a better solution?
I have lots of different heroes and abilities on my map. My goal is to make certain heroes to learn certain abilities at certain levels, so I thought it might be a good idea to store unit types and level-ability pairs into an array of some kind. The ideal structure is like this:
Code:
unit type 1 |level 1, ability 1
|level 2, ability 2
| ...
-------------------------------
unit type 2 |level 3, ability 3
|level 4, ability 4
|level 5, ability 5
| ...
-------------------------------
... |
So basically any number of ability-level pairs can be linked to a unit type, and all these <unit type>-<level-ability pair list> pairs are listed in an array. This would be easier in vJASS since it has structs, but I prefer using the original world editor. So, should I use hashtable for this or is there a better solution?