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

AoE Armor Debuff

Status
Not open for further replies.
Level 5
Joined
Sep 10, 2006
Messages
185
I've got this spell, it's channel(instant, no target. I want to keep it this way) with triggered Special FX and no damage. I'm trying to trigger something to lower the armor of nearby enemy units by an arbitrary amount. I can't think of how to do this. I tried making a dummy unit for the same team, and having it cast acid bomb on itself however I can't get it to affect anything other than the dummy unit. The enemy units also can obviously move.

Thanks.
 
Get a Brilliance Aura ability with negative values (press Shift+Enter, before modifying the field) and add it to the unit, once it is casted. You will also need a hashtable:
  • Tr
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Hashtable - Create a hashtable
    • Set Hashtable = (Last created hashtable)
To remove the effect afterwards, use a dummy unit, give it expiration timer of an amount equal to the duration of your ability
  • Trigger
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to X
  • Actions
    • Set Point1 = (Position of (Triggering unit))
    • Unit - Create 1 dummy for (Owner of (Triggering unit)) at Point1 facing default building degrees
    • Hashtable - Save handle of (Triggering unit) as (Key(caster)) of (Key(Last created unit)) in Hashtable
    • Unit - Add a 5.00 seconds generic expiration timer to (Last created unit)
    • Unit - Add Brilliance Aura (Custom) to (Triggering unit)
    • Custom script: call RemoveLocation (udg_Point1)
and make a trigger:
  • Trigger
  • Events
    • Unit - A unit dies
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Dummy
  • Actions
    • Set Caster = (Load (Key(caster)) of (Key(Triggering unit)) from Hashtable)
    • Unit - Remove Brilliance Aura (Custom) from Caster
    • Hashtable - Clear all child hashtables of (Key(Triggering unit)) from Hashtable
References:
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/hashtables-mui-133407/
 
Level 5
Joined
Sep 10, 2006
Messages
185
Thanks, but let me be more clear. It works like this:

1.) I cast spell.
2.) Every unit in x range gets the armor debuff
3.) If the units move away from the caster, they keep the armor debuff for an amount of time.

Yours is( I think?)
1.) I cast spell
2.) Every unit in x range gets debuff
3.) if units leave range, debuff goes away, if new units come in they get debuff
 
Status
Not open for further replies.
Top