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

[Trigger] Taunt with AOE Healing effect help.

Status
Not open for further replies.
I'm tying to create a ability based off taunt that causes the closest enemies are forced to attack this hero. While active it causes all nearby friendly units and the hero to be healed for 10/20/30 hit points every time the hero is attacked. Lasts 7 seconds.

I have two spells; the hero spell based on taunt and the dummy ability based off howl of terror which grants the hero the buff.

My problem I'm having is combing the parts of the spell. If I have the hero use dummy ability itself the healing effect works fine. However when I use the taunt first and and try to give the Hero the buff through the dummy ability, the Hero dose not revive the buff that causes the healing effect

Taunt Spell
Screenshot (3).png


Dummy Spell
Screenshot (4).png


Taunt Trigger
  • Apotheosis Cast
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • ((Issued order) Equal to (Order(Taunt))) and ((Ability being cast) Equal to Apotheosis (Taunt Version) )
    • Actions
      • Set VariableSet Apotheosis_Caster = (Ordered unit)
      • Set VariableSet Apotheosis_Dummy_Ability = Apotheosis (Taunt Version) (Dummy)
      • Set VariableSet Apotheosis_Point2 = (Position of Apotheosis_Caster)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Wait 0.33 seconds
          • Unit - Create 1 Dummy for (Owner of Apotheosis_Caster) at Apotheosis_Point2 facing Default building facing degrees
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • Unit - Add Apotheosis_Dummy_Ability to (Last created unit)
          • Unit - Order (Last created unit) to Neutral Pit Lord - Howl Of Terror.
        • Else - Actions
          • Custom script: call RemoveLocation(udg_Apotheosis_Point2)
Dummy Trigger
  • Apotheosis Effect
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) has buff Apotheosis ) Equal to True
    • Actions
      • Set VariableSet Apotheosis_Attacked = (Attacked unit)
      • Set VariableSet Apotheosis_Point = (Position of Apotheosis_Attacked)
      • Set VariableSet Apotheosis_Group = (Units within 500.00 of Apotheosis_Point matching (((Matching unit) belongs to an ally of (Owner of Apotheosis_Attacked).) Equal to True).)
      • Unit Group - Pick every unit in Apotheosis_Group and do (Actions)
        • Loop - Actions
          • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (10.00 x (Real((Level of Apotheosis (Taunt Version) for Apotheosis_Attacked)))))
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\VampiricAura\VampiricAuraTarget.mdl
          • Special Effect - Destroy (Last created special effect)
      • Custom script: call DestroyGroup(udg_Apotheosis_Group)
      • Custom script: call RemoveLocation(udg_Apotheosis_Point)
 
Last edited by a moderator:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,593
Your Apotheosis Cast trigger doesn't really make much sense. Here's what you need to do to fix it.

First, when dealing with abilities, you want to use the associated Ability Events:
  • Events
    • Unit - A unit Begins casting an ability
    • Unit - A unit Starts the effect of an ability
    • Unit - A unit Stops casting an ability
    • Unit - A unit Finishes casting an ability
    • Unit - A unit Begins channeling an ability
In this case you want to use Starts the effect of an ability as it happens the moment the ability is executed (mana is spent, cooldown begins, effects launch).

Second, you can get rid of the Issued Order condition because we're not dealing with an Order, we're dealing with an Ability being cast.

Third, you shouldn't be using Howl of Terror as the spell to apply a buff, it's one of the worst choices since it's an AoE ability that's meant to target enemy units. Instead, use something like Inner Fire which is single target and is meant for allies.

Fourth, you have an unnecessary If Then Else statement which is making you leak a Point and the Wait is unnecessary.

Here's the trigger after these fixes are applied:
  • Apotheosis Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Apotheosis (Taunt Version)
    • Actions
      • Set VariableSet Apotheosis_Caster = (Casting unit)
      • Set VariableSet Apotheosis_Point = (Position of Apotheosis_Caster)
      • Unit - Create 1 Dummy for (Owner of Apotheosis_Caster) at Apotheosis_Point facing Default building facing degrees
      • Unit - Add a 0.25 second Generic expiration timer to (Last created unit)
      • Unit - Add Apotheosis (Taunt Version) (Dummy) to (Last created unit)
      • Unit - Order (Last created unit) to Human Inner Fire Apotheosis_Caster.
      • Custom script: call RemoveLocation(udg_Apotheosis_Point)
I also got rid of some unnecessary variables and reused Apotheosis_Point which is perfectly fine to do here. You could also replace Apotheosis_Attacked with Apotheosis_Caster if you wanted to save even more variables.

Also, make sure your Dummy unit is setup properly. It should be based on the Locust unit with the follow settings changed:
Attacks enabled = None, Movement type = None, Speed Base = 0, Model = None, Shadow = None.
With these settings the Dummy unit will cast spells instantly without needing to turn to face it's target.

Oh and don't forget to make the Dummy ability actually castable. It should have 99999 Cast Range, 0 Mana Cost, No Requirements, and the proper Targets Allowed.


Apotheosis Effect looks great except for one minor issue with the Unit Group:
  • Set VariableSet Apotheosis_Group = (Units within 500.00 of Apotheosis_Point matching (((Matching unit) belongs to an ally of (Owner of Apotheosis_Attacked).) Equal to True).)
This will add Dead units, Structures, Mechanical units, etc. to the Unit Group. Some of this may be intentional, but I doubt you want to heal Dead units.
 
Last edited:
Your Apotheosis Cast trigger doesn't really make much sense. Here's what you need to do to fix it.

First, when dealing with abilities, you want to use the associated Ability Events:
  • Events
    • Unit - A unit Begins casting an ability
    • Unit - A unit Starts the effect of an ability
    • Unit - A unit Stops casting an ability
    • Unit - A unit Finishes casting an ability
    • Unit - A unit Begins channeling an ability
In this case you want to use Starts the effect of an ability as it happens the moment the ability is executed (mana is spent, cooldown begins, effects launch).

Second, you can get rid of the Issued Order condition because we're not dealing with an Order, we're dealing with an Ability being cast.

Third, you shouldn't be using Howl of Terror as the spell to apply a buff, it's one of the worst choices since it's an AoE ability that's meant to target enemy units. Instead, use something like Inner Fire which is single target and is meant for allies.

Fourth, you have an unnecessary If Then Else statement which is making you leak a Point and the Wait is unnecessary.

Here's the trigger after these fixes are applied:
  • Apotheosis Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Apotheosis (Taunt Version)
    • Actions
      • Set VariableSet Apotheosis_Caster = (Casting unit)
      • Set VariableSet Apotheosis_Point = (Position of Apotheosis_Caster)
      • Unit - Create 1 Dummy for (Owner of Apotheosis_Caster) at Apotheosis_Point facing Default building facing degrees
      • Unit - Add a 0.25 second Generic expiration timer to (Last created unit)
      • Unit - Add Apotheosis (Taunt Version) (Dummy) to (Last created unit)
      • Unit - Order (Last created unit) to Human Inner Fire Apotheosis_Caster.
      • Custom script: call RemoveLocation(udg_Apotheosis_Point)
I also got rid of some unnecessary variables and reused Apotheosis_Point which is perfectly fine to do here. You could also replace Apotheosis_Attacked with Apotheosis_Caster if you wanted to save even more variables.

Also, make sure your Dummy unit is setup properly. It should be based on the Locust unit with the follow settings changed:
Attacks enabled = None, Movement type = None, Speed Base = 0, Model = None, Shadow = None.
With these settings the Dummy unit will cast spells instantly without needing to turn to face it's target.

Oh and don't forget to make the Dummy ability actually castable. It should have 99999 Cast Range, 0 Mana Cost, No Requirements, and the proper Targets Allowed.



Apotheosis Effect looks great except for one minor issue with the Unit Group:
  • Set VariableSet Apotheosis_Group = (Units within 500.00 of Apotheosis_Point matching (((Matching unit) belongs to an ally of (Owner of Apotheosis_Attacked).) Equal to True).)
This will add Dead units, Structures, Mechanical units, etc. to the Unit Group. Some of this may be intentional, but I doubt you want to heal Dead units
Thanks for the reply. I originally had Ability cast events and condition, but when the trigger wouldn't fire correctly I changed it to the ordered values to see if it worked like defend or immolation. I made the changes you recommended however the hero still dose not receive the buff.

Fixed trigger
Apotheosis Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Apotheosis (Taunt Version)
Actions
Set VariableSet Apotheosis_Caster = (Casting unit)
Set VariableSet Apotheosis_Point = (Position of Apotheosis_Caster)
Unit - Create 1 Dummy for (Owner of Apotheosis_Caster) at Apotheosis_Point facing Default building facing degrees
Unit - Add a 0.25 second Generic expiration timer to (Last created unit)
Unit - Add Apotheosis (Innerfire Version) (Dummy) to (Last created unit)
Unit - Order (Last created unit) to Human Priest - Inner Fire Apotheosis_Caster
Custom script: call RemoveLocation(udg_Apotheosis_Point)

Inner fire spell

Screenshot (5).png


EDIT:
I made separate dummy with the inner fire based spell already applied to it. That fixed the problem.
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,593
That looks good so the most likely issue would be your Dummy unit. Quoting my last post:
Also, make sure your Dummy unit is setup properly. It should be based on the Locust unit with the follow settings changed:
Attacks enabled = None, Movement type = None, Speed Base = 0, Model = None, Shadow = None.
Units by default have a Cast Point and Cast Backswing which determines how long they play their cast animation before and after casting a spell. If the Cast Point is > 0.00 then the spell will NOT be instant, it will take that much time before executing. Locusts have 0.00 for both of these values by default.

You shouldn't need a separate Dummy unit, one Dummy unit with the proper settings should handle just about everything. It sounds like your original Dummy was messed up.
 
Last edited:
Status
Not open for further replies.
Top