• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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