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

Activable passive spells

Status
Not open for further replies.
Level 4
Joined
Aug 31, 2011
Messages
88
Hi guys!

I need some help with active passive spells.

So basicaly generic hero would have three auras, each of them would passively do something (1 for hp regen, 1 for armor and third for something else)

My problem is how to do 2 spells in 1 for example:

1st aura would passively give xy% hp regen, but you can also activate it to triple the amount of hp regen for xy secunds. While that spell is active, the passive part of the aura is disabled.

The active part of it would ofc have mana cost and cd, while the passive part is functioning exactly as aura.

Need some help with this... +rep
 
1) Edit your aura's X/Y button coordinates to 0/-11 (this hides the icon)
2) Add a new hero-learnable spell to the unit with the same name as that aura (and activatable icon), base it off channel
3) When the spell is cast, remove the aura spell, and add the second aura spell (which is also hidden with the 0/-11 X/Y button coordinate trick)
4) After DURATION seconds, remove the new ability, and give the unit beck the old one

Basically, at all times, you'll only see the icon of the activatable ability, and its cooldown and mana cost and all, those two abilities that DO THE WORK are hidden (but you see their buffs).
 
Level 4
Joined
Aug 31, 2011
Messages
88
I tried doing all steps, but I think I screwed half way somewhere hmmm. :/

Your 1) step is working as intended.
2) step doesn't work as it supposed to, it doesn't give the right level of skill to hero.
3) step works as intended
4) step just doesn't work, it doesn't replace the new skill with the old one

2) Hero-learnable spell trigger


  • Locus of Hadra
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Locus of Hadra
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Locus of Hadra for (Triggering unit)) Equal to 1
        • Then - Actions
          • Unit - Add Locus of Hadra (Aura) to (Triggering unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Locus of Hadra for (Triggering unit)) Greater than 1
            • Then - Actions
              • Unit - Increase level of Locus of Hadra (Aura) for (Triggering unit)
            • Else - Actions


3) Spell cast trigger - timer start trigger


  • Hadra timer starts
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Locus of Hadra
    • Actions
      • Countdown Timer - Start hadra_timer as a One-shot timer that will expire in 5.00 seconds
      • Unit - Remove Locus of Hadra (Aura) from (Triggering unit)
      • Unit - Add Locus of Hadra (Empowered) (Aura) to (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Locus of Hadra for (Triggering unit)) Equal to 2
        • Then - Actions
          • Unit - Set level of Locus of Hadra (Empowered) (Aura) for (Triggering unit) to 2
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Locus of Hadra for (Triggering unit)) Equal to 3
            • Then - Actions
              • Unit - Set level of Locus of Hadra (Empowered) (Aura) for (Triggering unit) to 3
            • Else - Actions


4) Timer expiration trigger


  • Hadra timer expire
    • Events
      • Time - hadra_timer expires
    • Conditions
    • Actions
      • Unit - Remove Locus of Hadra (Empowered) buff from (Triggering unit)
      • Unit - Remove Locus of Hadra (Empowered) (Aura) from (Triggering unit)
      • Unit - Add Locus of Hadra (Aura) to (Triggering unit)
 
Last edited:
Of course it won't give the right skill of the ability, you should set the level of the skill yourself.

When you're adding the ability, set its level for that hero to the level of the active ability. This way, every time the passive ability is added/removed, its level will be equal to the ability that is activatable so that issued will be solved.

Your last trigger doesn't work because "TriggeringUnit" refers to some random unit, not the one that casted the ability.

If only one hero per game can use this ability, set that unit to a variable, then use it instead of TriggeringUnit.
 
Level 4
Joined
Aug 31, 2011
Messages
88
Did as you said, now almost everything works.

The only problem is in the last trigger, when the old spell replaces new spell, the old spell is set to lvl 1 and not on the lvl of skill.
If the level of active skill is 3, when the last triggers fires, the new passive, gets replaced with the old passive, but that old passive is set to level 1, instead of level 3.

  • Hadra timer expire
    • Events
      • Time - hadra_timer expires
    • Conditions
    • Actions
      • Unit - Remove Locus of Hadra (Empowered) buff from patrirarch
      • Unit - Remove Locus of Hadra (Empowered) (Aura) from patrirarch
      • Unit - Add Locus of Hadra (Aura) to patrirarch
      • Unit - Set level of Locus of Hadra (Aura) for patrirarch to (Level of Locus of Hadra for patrirarch)
 
Status
Not open for further replies.
Top