• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Damage Detect variable.

Status
Not open for further replies.
Level 11
Joined
Dec 5, 2009
Messages
846
Hello. I want to detect damage and i thought you could first store the unit in an variable then do another trigger where you use the stored unit in the event Unit - Takes Damage but in that event it wont find the variable... Is there anyway to do this?
I want it like this:

  • Storing
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to Sorceress 0003 <gen>
    • Actions
      • Unit Group - Pick every unit in (Units within 1000.00 of (Position of (Attacking unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Set unit = (Picked unit)
          • Set unit2 = (sorceress0013)
          • Trigger - Turn on using the stored <gen>
  • using the stored
    • Events
      • Unit - unit Takes damage
    • Conditions
      • Unit2 Equal to (Damage source)
    • Actions
 
Level 9
Joined
Jul 10, 2011
Messages
562
use GDD (Gui-friendly damage detection)....with that system you can easily get the damage (or the damage dealer or the damaged unit^^)
 
Status
Not open for further replies.
Top