• 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.

[Trigger] Specifying Siphon Mana Target

Status
Not open for further replies.
Level 5
Joined
Jul 16, 2009
Messages
80
This probably sounds easy, but somehow I failed to specify the targeted unit to set it into a unit variable.

What I want:
- Hero drains mana from an enemy.
- When the Hero stops draining mana (either end of spell duration or stunned or walked away), deals damage to the enemy unit.
- Damage = Amount of mana missing.
- Damage is to be dealt as one lump sum, not over time.

Here's my trigger:

  • Mana Break
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Siphon Mana
    • Actions
      • Set ManaBreak_User = (Triggering unit)
      • Set ManaBreak_Target = (Target unit of ability being cast)
      • Set ManaBreak_Damage = ((Max mana of ManaBreak_Target) - (Mana of ManaBreak_Target))
      • Unit - Cause ManaBreak_User to damage ManaBreak_Target, dealing ManaBreak_Damage damage of attack type Spells and damage type Normal


Please ignore MUI for the time being.

Can anyone suggest a better way to specify the (Target unit of ability being cast)?

Ask me for more details if needed.
 
Status
Not open for further replies.
Top