1. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  2. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  6. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Activable passive spells

Discussion in 'World Editor Help Zone' started by Watcher, Jan 19, 2018.

  1. Watcher

    Watcher

    Joined:
    Aug 31, 2011
    Messages:
    87
    Resources:
    0
    Resources:
    0
    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
     
  2. HappyTauren

    HappyTauren

    Joined:
    Nov 3, 2006
    Messages:
    8,408
    Resources:
    87
    Models:
    61
    Icons:
    23
    Packs:
    1
    Tutorials:
    2
    Resources:
    87
    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).
     
  3. Watcher

    Watcher

    Joined:
    Aug 31, 2011
    Messages:
    87
    Resources:
    0
    Resources:
    0
    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

    • 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

    • 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

    • 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: Jan 19, 2018
  4. HappyTauren

    HappyTauren

    Joined:
    Nov 3, 2006
    Messages:
    8,408
    Resources:
    87
    Models:
    61
    Icons:
    23
    Packs:
    1
    Tutorials:
    2
    Resources:
    87
    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.
     
  5. Watcher

    Watcher

    Joined:
    Aug 31, 2011
    Messages:
    87
    Resources:
    0
    Resources:
    0
    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)
     
  6. HappyTauren

    HappyTauren

    Joined:
    Nov 3, 2006
    Messages:
    8,408
    Resources:
    87
    Models:
    61
    Icons:
    23
    Packs:
    1
    Tutorials:
    2
    Resources:
    87
    Since only one instance of this ability will be in the game, you can have a variable set to the level of the ability. Set it to 0 at start, and every time a hero learns a new level of this ability, add 1 to it, and then use this variable to set levels of abilities.

    That should work for your case pretty well.
     
  7. Watcher

    Watcher

    Joined:
    Aug 31, 2011
    Messages:
    87
    Resources:
    0
    Resources:
    0
    Thank you soooo much m8, now everything works!

    +rep