im making a save/ load system and i have this problem:
I have string variable with a name of ability. How can i make function which will give ability (ability which name is in variable) to hero.
Maybe it is crazy but im searching or the principle what i searching for is this:
Add (ability ("string variable")) to Unit (somehow get from string variable the ability variable)
I dont want to use:
If string variable is ......
that give this ability to .....
- because i have more than 250 abilities and it lags
im not affraid of JASS so it could be used too.
I have string variable with a name of ability. How can i make function which will give ability (ability which name is in variable) to hero.
Maybe it is crazy but im searching or the principle what i searching for is this:
Add (ability ("string variable")) to Unit (somehow get from string variable the ability variable)
I dont want to use:
If string variable is ......
that give this ability to .....
- because i have more than 250 abilities and it lags
im not affraid of JASS so it could be used too.