Hi.
I would like to know if the Learn Skill Menu has a id?
I need to hide this ability temporarily using the new natives, but I do not know if has a ID.
thanks for read.
'Aatk'
) and move ('Amov'
). I couldn't find it. You can always simulate learning hero abilities through spellbooks, but it is tedious.Interesting link you provided, i will search in the whole page thanks.I'm not sure if it has it's own raw code like attack ('Aatk'
) and move ('Amov'
). I couldn't find it. You can always simulate learning hero abilities through spellbooks, but it is tedious.
You can find some of the data here: theQuazz/wc3-devkit
That button will disappear automatically while either of the following is true:
You can abuse this to temporarily hide the the learn skill button by doing the following:
- All learnable hero abilities for the hero are at max level and the hero doesn't have any extra skill points
- The hero has no learnable abilities at all (generally the same case as above, unless the unit has no abilities in the editor)
Not the greatest but it does work.
- Store the current level of all learned abilities of the hero.
- Store information about which abilities haven't been learned yet at all.
- Store the current number of unspent skill points.
- For every ability in step 1, set its level to the max possible level
- For every ability found in step 2 do the following
- Increase the hero's number of unspent skill points by 1
- Force the hero to learn the skill (Hero - Learn skill action)
- Set its level to max level
- Disable the ability for the hero (Unit - for <unit>, <ability>, Disable ability: true, Hide UI: true)
- Set the current number of unspent skill points for the hero to 0
- Wait until you want to show the button again; during this time all abilities will be at maximum level, which may be important for auras and tooltips
- For every ability found in step 2 (same as 5) do the following:
- Remove the ability from the hero (it will still be learnable after this)
- Enable the ability for the hero
- For every ability modified in step 4, set it back to its original level
- Set the hero's number of unspent skill points to the number stored in step 3
Use a boolean variable as a flag that you set before you force-level-up abilities, then check for that boolean in your learned skill triggers:i think that this method messed up the Learn Skill event, if i working on set datas based on learned skills.
Use a boolean variable as a flag that you set before you force-level-up abilities, then check for that boolean in your learned skill triggers:
Here's a testmap. Press escape to disable the hero abilities button on the Archmage for 2 seconds.
-------- Example --------
Set ForcedSkillFlag = true
Hero - Learn skill for Archmage 0001 <gen>: Summon Water Elemental
Set ForcedSkillFlag = false
Unit - Set level of Summon Water Elemental for Archmage 0001 <gen> to 3
Hero - Modify unspent skill points of Archmage 0001 <gen>: Set to 0 points
Unit - For Archmage 0001 <gen>, Ability Summon Water Elemental, Disable ability: True, Hide UI: True
Wait 2.00 seconds
Unit - For Archmage 0001 <gen>, Ability Summon Water Elemental, Disable ability: False, Hide UI: False
Unit - Remove Summon Water Elemental from Archmage 0001 <gen>
Hero - Modify unspent skill points of Archmage 0001 <gen>: Set to 3 points
-------- In your other trigger --------
Conditions
ForcedSkillFlag equal to false
call BlzUnitDisableAbility(hero,'AHer',true,true)
call BlzUnitDisableAbility(hero,'AHer',false,false)