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

[Solved] How to put initial cooldown for spell/skill/ability?

Status
Not open for further replies.
Level 5
Joined
Mar 26, 2020
Messages
66
as the title said, as we all know after learning an ability it can be cast anytime be it channel or instant~

i want a trigger where after learning this specific ability, you get a fixed initial cooldown.
EX: learn Q spell, after learning it has initial 30 sec cooldown before to be able to cast/use
 
Level 12
Joined
Feb 5, 2018
Messages
521
  • Ability cooldown ini
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Lets set the cd for the skills to 30 --------
      • -------- This is just an example on how to make preset arrays --------
      • Set VariableSet AbilityIni[1] = Avatar
      • Set VariableSet AbilityIni[2] = Bash
      • Set VariableSet AbilityIni[3] = Thunder Clap
      • Set VariableSet AbilityIni[4] = Storm Bolt
  • Ability learned
    • Events
      • Unit - A unit Learns a skill
    • Conditions
    • Actions
      • For each (Integer AbilityLoopInteger) from 1 to 4, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of AbilityIni[AbilityLoopInteger] for (Triggering unit)) Equal to 1
            • Then - Actions
              • Unit - For Unit (Triggering unit), start cooldown of ability AbilityIni[AbilityLoopInteger] " over "30.00 seconds.
            • Else - Actions
This is a quick draft on how one could make such trigger. I just ran a test map and it worked. Note that you need to have the latest version to use the "Start cooldown of ability" action. We propably need further checks if you want to a different variety of cooldowns. It's simple thought if you want all spells to have 30 second cooldown or any other preset cooldown. Just add all the abilities to the list.

AbilityIni is ability code variable with array.
AbiltyLoopInteger variable is integer variable.

Triggering unit works as local unit in this trigger and it runs instantly so no need to add anything too crazy into this trigger.
 
Level 5
Joined
Mar 26, 2020
Messages
66
how do you do that loop action part? i mean the if and then actions
1626152204281.png
i meant this part, the buttom one for 'if - Conditions, Then - Actions, Else - Actions.' what configure action are those that you used as sample? (sry i'm still struggling to know those stuffs part)
 
Level 12
Joined
Feb 5, 2018
Messages
521
It's integer comparison, level of ability for unit. :)

I recommend reading tutorials from this site to learn the basics of triggering.
 
Level 2
Joined
Jul 25, 2021
Messages
11
  • Ability cooldown ini
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Lets set the cd for the skills to 30 --------
      • -------- This is just an example on how to make preset arrays --------
      • Set VariableSet AbilityIni[1] = Avatar
      • Set VariableSet AbilityIni[2] = Bash
      • Set VariableSet AbilityIni[3] = Thunder Clap
      • Set VariableSet AbilityIni[4] = Storm Bolt
  • Ability learned
    • Events
      • Unit - A unit Learns a skill
    • Conditions
    • Actions
      • For each (Integer AbilityLoopInteger) from 1 to 4, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of AbilityIni[AbilityLoopInteger] for (Triggering unit)) Equal to 1
            • Then - Actions
              • Unit - For Unit (Triggering unit), start cooldown of ability AbilityIni[AbilityLoopInteger] " over "30.00 seconds.
            • Else - Actions
This is a quick draft on how one could make such trigger. I just ran a test map and it worked. Note that you need to have the latest version to use the "Start cooldown of ability" action. We propably need further checks if you want to a different variety of cooldowns. It's simple thought if you want all spells to have 30 second cooldown or any other preset cooldown. Just add all the abilities to the list.

AbilityIni is ability code variable with array.
AbiltyLoopInteger variable is integer variable.

Triggering unit works as local unit in this trigger and it runs instantly so no need to add anything too crazy into this trigger.
whoa! can i have your dummy file of that? sorry, new here...looks simple but quite complex for a new to editor, would love to explore how/what action configs you used
 
Level 12
Joined
Feb 5, 2018
Messages
521
whoa! can i have your dummy file of that? sorry, new here...looks simple but quite complex for a new to editor, would love to explore how/what action configs you used

Well I don't have it since I just always make a new map to help someone out and then never save it, but it's all explained on this thread. And since the testmap file is already overwritten by another file so. The variables used are explained on the original respond by me.

There are no other configs made.
 
Level 12
Joined
Feb 5, 2018
Messages
521
If you are on an older patch you won't find it. I can't remember which patch introtruced this feature, but I think it's around 1.31+.
 
Level 2
Joined
Jul 25, 2021
Messages
11
i see, thank you...im currently downloading 1.31+ patch to find that, i need your sample trigger for my testing map xd
 
Level 2
Joined
Jul 25, 2021
Messages
11
i see, thank you...im currently downloading 1.31+ patch to find that, i need your sample trigger for my testing map xd
@DoomBlade 1.31 is reforge, i tot its classic, i was wondering when downloading it, it has battlenet UI. Why didn't you say that 1.31 is reforged lol

still....a shame i can't use that trigger :(

EDIT1: welp, my old warcraft 3 is now fooked, i don't own the reforge and its automatically updating on my battlenet, world editor now crashes (old warcraft) and game can't run (this 'reforge' after logging in despite i don't own the game) lmao
1627301284119.png

EDIT2: and now it's super hard to find old warcraft 3, all i see are 1.27-1.31 patches and not the game installer whatsoever :(

EDIT3: game is working normally but i can no longer access world editor.....
 
Last edited:
Status
Not open for further replies.
Top