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

ability request

Status
Not open for further replies.
Level 5
Joined
Aug 25, 2010
Messages
120
Hy!

I wanna to request a spell.

It's name: Witchcraft Aura

Description: When a unit die under the effect of the aura, all nearby friendly units heals the 5%(10%,15%) of the hitpoints of the dead unit (which can be enemy or friendly unit).


Can somebody help me to create it???


THX
 
Level 11
Joined
Nov 15, 2007
Messages
781
  • Aura
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) has buff Witchcraft Aura) Equal to True
    • Actions
      • Set point = (Position of (Triggering unit))
      • Set group = (Units within 900.00 of point) matching ((Level of Witchcraft Aura for (Matching unit)) Greater than or equal to 1))
      • Unit Group - Pick every unit in group and do (Actions)
        • Loop - Actions
          • Set unit = (Picked unit)
          • Set group2 = (Units within 300.00 of point matching (((Matching unit) belongs to an ally of (Owner of unit)) Equal to True))
          • Unit Group - Pick every unit in group2 and do (Actions)
            • Loop - Actions
              • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + ((0.05 x (Real((Level of Witchcraft Aura for unit)))) x (Max life of (Triggering unit))))
          • Custom script: call DestroyGroup(udg_group2)
      • Custom script: call DestroyGroup(udg_group)
      • Custom script: call RemoveLocation(udg_point)
Should work. Haven't tested.

Group = units with the ability, so that the ability can work for multiple units (cannot detect buff owner AFAIK). Range is 900 because that's the default range for auras, change it to match yours.

Group2 = units that receive healing. I assumed you wanted it to be units near the dying unit, and in a smaller radius than the full aura size. Set 300 to whatever range you actually want.
 
Level 5
Joined
Aug 25, 2010
Messages
120
Thanks!

I want to units heal whitin the aura, which is around the hero. So when a unit die under the effect of the aura(has the buff), the other units within the aura, around the hero heals 5% of the dead units hp.
 
Level 5
Joined
Aug 25, 2010
Messages
120
Sorry for the double post:p

Yes i create the variables and the spell itself, but or it does not work or I made ​​a mistake.


And the spell : a hero aura that add buff to every units in 900 range, when a unit, with this buff die, all alive friendly units with the buff heals hp (fix 20,30,40 hp example).
 
Last edited:
Level 11
Joined
Nov 15, 2007
Messages
781
Durrr. Dead units don't have buffs. My mistake.


  • Witchcraft Aura
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set point = (Position of (Triggering unit))
      • Set group = (Units within 900.00 of point matching ((Level of Witchcraft Aura for (Matching unit)) Greater than or equal to 1))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in group) Equal to 0
        • Then - Actions
          • Custom script: call RemoveLocation(udg_point)
          • Custom script: call DestroyGroup(udg_group)
        • Else - Actions
          • Unit Group - Pick every unit in group and do (Actions)
            • Loop - Actions
              • Set unit = (Picked unit)
              • Custom script: call RemoveLocation(udg_point)
              • Set point = (Position of unit)
              • Set group2 = (Units within 900.00 of point matching (((Matching unit) belongs to an ally of (Owner of unit)) Equal to True))
              • Unit Group - Pick every unit in group2 and do (Actions)
                • Loop - Actions
                  • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + ((0.05 x (Real((Level of Witchcraft Aura for unit)))) x (Max life of (Triggering unit))))
              • Custom script: call DestroyGroup(udg_group2)
              • Custom script: call RemoveLocation(udg_point)
      • Custom script: call DestroyGroup(udg_group)
 
Status
Not open for further replies.
Top