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

Armor gain taunt

Status
Not open for further replies.
Level 5
Joined
Jan 15, 2018
Messages
128
Im attempting to make a trigger similar to Axe's taunt in dota. However im struggling with when the ability is over how can i reset the units armor back to normal?

  • SamT
    • Events
      • Unit - Samwise 0808 <gen> Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Taunt (samwise)
    • Actions
      • Unit - Set Armor of (Triggering unit) to 50.00
 
Level 7
Joined
Apr 17, 2017
Messages
316
It is not wise to manipulate armor data directly, create a new spell based off spiked carapace and change its button position to x=0 y=-11(by shift clicking to enter a negative value) and change reflection value 0. Add that ability to your triggering unit wait 5 seconds remove that ability from triggering unit.
 
Level 13
Joined
Oct 12, 2016
Messages
769
You could also base the taunt ability off the item spell "Item Temporary Area Armor Bonus," pick all enemy units in a radius around the hero, and then just force them to attack.
Alternatively, use the Taunt ability but use something like Inner Fire or one of the Roar spells on a dummy unit to give the armor bonus.
If you don't want to use a buff that can get dispelled, you could even base it off of the Avatar ability.
 
Level 1
Joined
Jan 12, 2019
Messages
7
taunt001.jpg taunt002.jpg

This is my very simple way of doing tricks like that, don't know if it works for you too and you have to edit it as you can imagine, it is just a layout for you to understand the idea of minimalistic tricksterism. All you have to do is an "if" function and make the game engine check the condition every x second, your "if" is your hero's ability cooldown, so you may set numeric values and buffs without any additional information kept in memory. It's already using that ability condition data repeatedly.
 
Level 13
Joined
Oct 12, 2016
Messages
769
@Atakan Özel
There's a few problems with that method.
What if the hero is not preset? What happens if more than 1 unit uses the "Taunt" spell?
What if the armor gained is from multiple levels?
What if there are items affecting armor?

For that, you will need unit indexing to make sure you are truly getting the right amount of duration and armor reset for the hero.
Although not fully MUI, assuming there's only 1 hero with "Taunt" per player,
and assuming the duration of the armor increase is 10 seconds,
something like this with variables would work:
  • Taunt Armor Part 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Taunt
    • Actions
      • Set TauntArmor[(Player number of (Owner of (Triggering unit)))] = (Armor of (Triggering unit))
      • Set TauntHero[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Unit - Set Armor of (Triggering unit) to ((Armor of (Triggering unit)) + ((Real((Level of (Ability being cast) for (Triggering unit)))) x 5.00))
      • Set TauntCheck[(Player number of (Owner of (Triggering unit)))] = True
      • Trigger - Run Taunt Armor End 2 <gen> (ignoring conditions)
  • Taunt Armor End 2
    • Events
    • Conditions
    • Actions
      • Wait 10.00 seconds
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TauntCheck[(Integer A)] Equal to True
            • Then - Actions
              • Set TauntCheck[(Player number of (Owner of (Triggering unit)))] = False
              • Unit - Set Armor of TauntHero[(Integer A)] to TauntArmor[(Integer A)]
            • Else - Actions
I also highly recommend using "A unit Starts the effect of an ability" to detect when something casts anything. It then triggers at the start of the cast.
In effect though, you CAN do it this way, but like what Aeryn said, it's not wise to directly manipulate the armor values even if it looks like a shortcut. It just creates ... problems.
 
Level 7
Joined
Oct 3, 2008
Messages
183
I might be reading it wrong but I think if hero A casts Taunt and then 2 seconds later hero B does both their taunts will expire when hero A's does.

A way to do it would be to track remaining buff duration for each hero with a variable, lower it every second for example and then when it reaches 0 remove the armor buff.
 
  • Like
Reactions: ISL
Level 1
Joined
Jan 12, 2019
Messages
7
That is why i said "you have to edit it" i just tried to give the main idea of cooldown trick. It works fine for only one specific unit with that ability without any additional data storage.

Just like Wark said, another way of doing it "simply" creating a new custom spell based on "inner fire"; event is "when a unit casts an ability" which is taunt and the condition is if the unit is your "specific hero" you may "give the hero custom inner fire" as an action, which has limited duration and temporal armor.

I know there are better ways to solve such problem but i'm just kind of a "minimalist" human beign so always trying to solve things with less variables and lines.
 
Status
Not open for further replies.
Top