• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Damage units, near a unit when using an ability.

Level 7
Joined
Sep 10, 2023
Messages
111
Hello, im trying to make that when a hero uses avatar, it deals damage to nearby enemy units. I have this trigger but the damage its not dealt. Any tips?


  • Avatar
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Avatar (Custom)
    • Actions
      • Set VariableSet MountainKingPosition = (Position of (Triggering unit))
      • Unit Group - Pick every unit in (Units within 512.00 of MountainKingPosition matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit)).) Equal to True).) and do (Unit - Cause (Triggering unit) to damage (Picked unit), dealing 2000.00 damage of attack type Spells and damage type Normal)
      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
      • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Orc\SpiritLink\SpiritLinkZapTarget.mdl
      • Custom script: call RemoveLocation(udg_MountainKingPosition)
 
Welp I've recreated virtually the same trigger minus the variable and the damage is dealt

  • Test
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Avatar
    • Actions
      • Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit)).) Equal to True).) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Norma
I doubt using a "pick every unit and do actionS" makes a difference but who knows? Also, did you double check that you did give this ability to your hero? At this point I don't really see what could be the problem aside from a silly error like that
 
Welp I've recreated virtually the same trigger minus the variable and the damage is dealt

  • Test
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Avatar
    • Actions
      • Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit)).) Equal to True).) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Norma
I doubt using a "pick every unit and do actionS" makes a difference but who knows? Also, did you double check that you did give this ability to your hero? At this point I don't really see what could be the problem aside from a silly error like that
I used your trigger and it worked too, but also... I realized I was using the wrong ability :peasant-bowing: thanks for the help!
 
Back
Top