• 🏆 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!

Set Hero Ability level

Status
Not open for further replies.
Level 6
Joined
Jul 22, 2009
Messages
214
I'm able to store the level of an ability with my save/load system but when I want to restore it I'm not able. The trigger that set the level of the ability is this.
  • Unit - Set level of SaveLoad_Skill_1[IntegerTEMP] for Hero[PlayerNumberTEMP] to LoadedLevel
SaveLoad_Skill_1[IntegerTEMP] this refer to hero ability, I've set an array for each class. SaveLoad_Skill_1[1] is the first spell of a class SaveLoad_Skill_1[2] is the first spell of another class...

What I think is that this action doesn't work with hero ability but I'm not sure. Really need help for this, I lost a complete days for searching in World Editor and on Hive(and other War3 modding sites I know) but I really found nothing.
 
Level 6
Joined
Jul 22, 2009
Messages
214
So for example, my system load that an X ability is level 4, I can create a loop like for IntergerTEMP from 1 to 4(skillLvl), in this loop I add 1 skill point and after I increase the level.
Is it possible to recover the Raw code of an ability stored in a variable via trigger or it's will be more easy if I create an String Variable and store the raw code of each ability inside?
 
Level 6
Joined
Jul 22, 2009
Messages
214
I asked it just because in the GUI version of SelectHeroSkill it's not possible to refer to an ability stored in a variable. I tested it with the custom script and it's work perfectly.
  • Custom script: call SelectHeroSkill( udg_Hero[udg_APlayerNumberTEMP], udg_SaveLoad_Skill_3[udg_IntegerTEMP] )
 
Status
Not open for further replies.
Top