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

[Spell] Harvest gold and lumber as hero abilities seem to be reset to level 1 on disabling

Status
Not open for further replies.
Level 25
Joined
Feb 2, 2006
Messages
1,686
Hi,
I want to create a nice Goblin Shredder hero for my map who has two hero abilities: Harvest Gold (based on neutral harvest) and Harvest Lumber (based on Goblin Shredder harvest).
It seems that after skilling the hero abilities to levels above 1, and ordering the hero to harvest, they will be reset to level 1 after he has returned gold and lumber to the town hall.
How can I prevent this?
Do I have to store the skill level whenever the ability is learned, check for Tome of Retraining events if it is unlearned again (how?), and restore it after the gold and lumber has been returned?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,514
I would just use two abilities, one that is passive and learned from the hero skill menu and the other being the actual harvest ability. You can make the passive ability hidden outside of the hero skill menu by setting it's Normal icon button positions to 0, -11.

The harvest ability would be added/scaled in level whenever you learn (level up) the passive ability.

With this design you won't have to worry about the learned skill changing in level.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,514
Hm okay but I still have to fix the level of the second ability then since it might also be reset to level 1 right?
Possibly, I don't know how it will behave as a non-Hero ability. If it does reset then you could adjust it periodically or in response to an event.

Luckily, you always know what level it needs to be:
  • Unit - Set level of Harvest for (Triggering unit) to (Level of Fake Harvest for (Triggering unit))
 
Status
Not open for further replies.
Top