• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Spell] Reset one ability upon cast

Status
Not open for further replies.
Level 7
Joined
Nov 8, 2008
Messages
174
Hi I'm still new to doing triggers,
Currently making a spell that let you buff a target unit, and that target unit when he cast, his spell would reset cooldown but the buff will be remove after that.
it only works to those abilities that has less than Required Level 6.


  • The Wizard of Menlo Park Casting Reset
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • ((Triggering unit) has buff The Wizard of Menlo Park ) Equal to True
    • Actions
      • Set WizardCaster = (Triggering unit)
      • Set WizardAbility = (Ability being cast)
      • Set WizardAbility_Copy = (Unit: WizardCaster's Ability with Ability Code: WizardAbility)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability: WizardAbility_Copy's Integer Field: Required Level ('arlv')) Less than 6
          • (Ability: WizardAbility_Copy's Boolean Field: Item Ability ('aite')) Equal to False
        • Then - Actions
          • Unit - Remove WizardAbility from WizardCaster
          • Unit - Add WizardAbility to WizardCaster
          • Unit - Remove The Wizard of Menlo Park buff from WizardCaster
        • Else - Actions
          • Trigger - Turn off (This trigger)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability: WizardAbility_Copy's Integer Field: Required Level ('arlv')) Greater than or equal to 6
        • Then - Actions
        • Else - Actions
          • Trigger - Turn off (This trigger)
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,700
There's actions for resetting a specific ability cooldown as well as starting an ability cooldown. Type "cooldown" in the search for text bar and you should find what you need. You can start the cooldown at 0.00 seconds to reset it as well.

Also, I don't think you want to Turn off the trigger, that doesn't really make sense to me. I'd delete the bottom If Then Else statement, the Turn off trigger action, and lastly delete the Remove/Add actions and replace them with the cooldown one.
 
Last edited:
Level 7
Joined
Nov 8, 2008
Messages
174
There's actions for resetting a specific ability cooldown as well as starting an ability cooldown. Type "cooldown" in the search for text bar and you should find what you need. You can start the cooldown at 0.00 seconds to reset it as well.

Also, I don't think you want to Turn off the trigger, that doesn't really make sense to me. I'd delete the bottom If Then Else statement, the Turn off trigger action, and lastly delete the Remove/Add actions and replace them with the cooldown one.
Thanks..
ah, I forgot to delete turn off..

Do note that only in versions above 1.27 can you reset a specific ability cooldown though. In 1.27 and below you can only reset all abilities cooldown.
I'm using 1.31.. saw the cooldown for the search bar..
 
Status
Not open for further replies.
Top