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

Sapping Aura

Status
Not open for further replies.
Level 2
Joined
Jun 3, 2009
Messages
19
Tinkering around with World Editor, and couldnt figure out how to make an aura ability that makes units in aura (not of players color) lose 1% of their current health every second. Then, the accumulative damage (damage dealt to all units because of the aura) is added to the unit with the aura's health. Thanks in advance for all help.

So lets say two units of the enemy team get within range of the aura
They have 1000 and 2000 health.
1000 times .01=10
2000 times .01=20
So 30 hp total, is then added to the unit with the aura's health
Or is it better to use jass or custon script rather then just the editor for this?
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
Basically like this. You can add special effects, level of ability damage increase etc.

  • Untitled Trigger 001
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Sap_Group and do (Actions)
        • Loop - Actions
          • Set r1 = 0.00
          • Set u1 = (Picked unit)
          • Set p1 = (Position of u1)
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within 512.00 of p1) and do (Actions)
            • Loop - Actions
              • Set u2 = (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (u2 is alive) Equal to True
                  • ((Unit-type of u2) is A structure) Equal to False
                  • (u2 belongs to an enemy of (Owner of u1)) Equal to True
                • Then - Actions
                  • Set r1 = (r1 + ((Life of u2) x 0.01))
                  • Unit - Cause u1 to damage u2, dealing ((Life of u2) x 0.01) damage of attack type Chaos and damage type Unknown
                • Else - Actions
          • Unit - Set life of u1 to ((Life of u1) + r1)
          • Custom script: call RemoveLocation(udg_p1)
EDIT: You could do this to save just a bit of computing power:
  • Set r2 = Life of u2 x 0.01
  • Set r1 = r1 + r2
  • Unit - Cause u1 to damage u2, dealing r2...
 

Attachments

  • Test1.w3x
    17.4 KB · Views: 55
Level 14
Joined
Dec 12, 2009
Messages
1,027
For a non-trigger method using the existing abilities, use Unholy Aura as the base ability.

Set "Data - Life Regeneration increase (%)" to -1 (Hold shift, double click on the data attribute, then enter the value to get something besides the normally allowed standard)

Set "Data - Movement Speed Increase (%)" to 0.

Set "Data - Percent Bonus" = true

Set "Stats - Targets Allowed" to "Air, Enemy, Ground, Neutral"

Give this ability to a neutral hostle unit that can't attack (make it invulnerable) on the map and don't allow it to have caster art.I did this in one of my maps and it works just fine.

If you want the entire map to be affected,
Set "Stats - Area Of Effect" to "99999.00"

//\\oo//\\
 
Last edited:
Level 33
Joined
Mar 27, 2008
Messages
8,035
For a non-trigger method using the existing abilities, use Unholy Aura as the base ability.

Set "Data - Life Regeneration increase (%)" to -1 (Hold shift, double click on the data attribute, then enter the value to get something besides the normally allowed standard)

Set "Data - Movement Speed Increase (%)" to 0.

Set "Data - Percent Bonus" = true

Set "Stats - Targets Allowed" to "Air, Enemy, Ground, Neutral"

Give this ability to a neutral unit (invulnerable) on the map and don't allow it to have caster art.I did this in one of my maps and it works just fine.

If you want the entire map to be affected,
Set "Stats - Area Of Effect" to "99999.00"

//\\oo//\\

My personal opinion
Using a pre-made abilities in WE has more efficiency than a triggered one
WHY?
Because it actually will cause NO BUGS OR WEIRD STUFF
I'd suggest you use a non-triggered spell first before exploring on triggers
 
Status
Not open for further replies.
Top