• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

another save/load system

Status
Not open for further replies.
Level 4
Joined
Feb 23, 2006
Messages
63
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.
 
Level 4
Joined
Feb 23, 2006
Messages
63
That is good idea but i need something different (i think). I need trigger which will match string with ability which name is the same as string.

hmmm....e.g.

chat string is Frost nova.
Now the trigger find ability called Frost nova and give it to hero (or set it as ability variable)


If it is too complicated ill try to explain it in another way.
 
Status
Not open for further replies.
Top