• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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:
https://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/hashtables-mui-133407/
 
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.
Back
Top