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

[Trigger] Switch between "Level 1" hero abilities and "Level 2" hero abilities

How can I switch between "Level 1 spell" and "Level 2 spell" with a Ultimate spell?

  • Work with spellbook-ability

    Votes: 0 0.0%
  • Change Hero unit when cast the ultimate spell

    Votes: 0 0.0%

  • Total voters
    0
Status
Not open for further replies.
Level 4
Joined
Oct 7, 2014
Messages
18
Hello,

I have a huge problem with my selfmade hero "Wishmaster". He has three hero abilities that at the beginning at "Level 1" (you can level up this spells as normal hero abilities, they are "red book 1", "blue book 1" and "green book 1") Now I want with his ultimate ability "Arcane Wisdom" to switch this three spells to "Level 2" spells. (Other three spells "red book 2", "blue book 2" and "green book 2")

But I have a bug when I have unspent hero skillpoints. When I spent a hero skillpoint to "red book" and the "red book 2" is activated it only learned "red book 1" and then I have two red book spells.

"Arcane Wisdom" is a channel spell with basic-id "roar".

I hope you understand the triggers, because its half english and half german.

My Warcraft TFT patch version is: 1.27

Here my triggers:

(When Wishmaster learns Arcane Wisdom he gets the variable "Wishmaster")

Learn Wishmaster.png


(Now I want the first switch (SwitchFoliant = false)

Switch Wishmaster 1.png


(This is the second switch (SwitchFoliant = true)

Switch Wishmaster 2.png
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
I'm not sure if you can do this in 1.27 but here's what I would do:

Create 3 new HERO abilities, let's call them "Learn Red 1", "Learn Blue 1", and "Learn Green 1". These will be passive abilities so you should base them off of an ability like Storm Hammers. These are the abilities that your Hero levels up similar to Red 1, Blue 1, and Green 1.
Set each of these abilities Art - Button - Normal (X) to 0, and Art - Button Position - Normal (Y) to -11. This will hide the Icon of the ability outside of the Hero Skill Menu.

Now take your old Red 1, Blue 1, and Green 1 abilities and remove them from the Hero Abilities so the Wishmaster can't learn them anymore. We're going to add these abilities to the Wishmaster with triggers like so:
  • Learn Red 1
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Learn Red 1
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Learn Red 1 for (Triggering unit)) Equal to 1
        • Then - Actions
          • Unit - Add Red 1 to (Triggering unit)
        • Else - Actions
          • Unit - Set level of Red 1 for (Triggering unit) to (Level of Learn Red 1 for (Triggering unit))
          • Unit - Set level of Red 2 for (Triggering unit) to (Level of Learn Red 1 for (Triggering unit))
^Create one of these triggers for Learn Blue 1 and Learn Green 1 as well.

Next you want to change your Red 2, Blue 2, and Green 2 to be NORMAL abilities and add them to the Wishmaster's Normal Abilities in the Object Editor. Then Disable these abilities so that they're not visible/usable until we activate Arcane Wisdom:
  • Disable
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Disable Red 2 for (Picked player)
          • Player - Disable Blue 2 for (Picked player)
          • Player - Disable Green 2 for (Picked player)
Then trigger it so that when you turn on Arcane Wisdom you disable Red 1, Blue 1, and Green 1, and enable Red 2, Blue 2, Green 2. Do the opposite for when turn off Arcane Wisdom.

The trigger would look something like this (I left out Blue/Green but they would follow the same pattern as Red):
  • Arcane Wisdom
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Arcane Wisdom
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AWSwitch Equal to False
        • Then - Actions
          • -------- LEVEL 2 --------
          • Set Variable AWSwitch = True
          • -------- Red --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Learn Red 1 for (Triggering unit)) Greater than 0
            • Then - Actions
              • Player - Disable Red 1 for (Triggering player)
              • Player - Enable Red 2 for (Triggering player)
            • Else - Actions
          • -------- Blue --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
            • Else - Actions
          • -------- Green --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
            • Else - Actions
        • Else - Actions
          • -------- LEVEL 1 --------
          • Set Variable AWSwitch = False
          • -------- Red --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Learn Red 1 for (Triggering unit)) Greater than 0
            • Then - Actions
              • Player - Disable Red 2 for (Triggering player)
              • Player - Enable Red 1 for (Triggering player)
            • Else - Actions
          • -------- Blue --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
            • Else - Actions
          • -------- Green --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
            • Else - Actions
So your Hero will have 9 Abilities based around Red, Blue and Green.

Learn Red1/Learn Blue1/Learn Green1 = The Hero abilities that you learn from the Hero Skill menu. These are passive abilities and hidden once learned.

Red 1/Blue 1/Green 1 = These are exactly the same as your current Red 1/Blue 1/Green 1 abilities but you DON'T learn these from the Hero skill menu anymore. They're added through triggers.

Red 2/Blue 2/Green 2 = Again, the same as your current RBG 2 abilities, but they're changed to NORMAL abilities instead of HERO abilities, are added to the Wishmaster by default, and are disabled with triggers by default.
 
Last edited:
Status
Not open for further replies.
Top