setting level of hero spell

Ticer

New Member
Reaction score
2
I'm trying to reset a cooldown for a single hero spell with this trigger:
Trigger:
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Set SoulOrb_Lvl = (Level of Soul Orbs for (Casting unit))
      • Unit - Remove Soul Orbs from (Casting unit)
      • Unit - Add Soul Orbs to (Casting unit)
      • Unit - Set level of Soul Orbs for (Casting unit) to SoulOrb_Lvl

Ignore the event/condition part, this is just part of the trigger. My problem is that it works until it gets to setting the spell level at the end. The ability is removed, then added back, but it remains unlearned for the hero and doesn't get changed back to its previous level. What am I doing wrong?
 

Baltazhar

Active Member
Reaction score
55
A couple of notes here:

Heroes are a bit different than normal units, that's why adding the ability doesn't work.
There is a "Hero - Learn skill" action, that will make the hero learn the ability if he has any points to level it. Think you can use "Unit - Remove ability", and the other to learn them back.
Alternately you can try "Player - Disable ability for player", and just disable it, and enable it again. That might work.

There is a "Unit - Reset Cooldown", that resets cooldown of all abilities of a unit (or hero), not sure if that's usable, or if you only want the one ability to refresh.

EDIT: My answer is just a mess, let me try to clarify it a bit more.

Try doing it like this:
Remove ability
Add ability
Add X skill points to hero
Learn Your_Ability for hero (repeat X times)

- Balt
 

vypur85

Hibernate
Reaction score
803
My advice is to use Normal ability instead of Hero ability, for your 'Soul Orbs'. Meaning, you need a dummy hero ability (say, Item Bonus Armor, without any boost). When you learn this dummy, add Soul Orbs to the hero. In this case, Soul Orbs will be in fact a unit ability. So, you refresh trigger would work.
 

Ticer

New Member
Reaction score
2
Thanks for the replys, I got it to work with using the add skill points and learn skill triggers.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top