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

Damage based on Damage Dealt

Status
Not open for further replies.
I'm working on a trigger that deals extra damage based on initial damage dealt. So if unit is dealt 10 damage when they have a specific buff then they are dealt an extra 2 damage (20%). The issue I'm having is finding a way to store the initial damage as an integer so I can do the damage calculation.

  • Critical Sector
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Triggering unit) has buff Critical Sector ) Equal to True
      • ((Attacking unit) is A ranged attacker) Equal to True
    • Actions
 
Level 5
Joined
Jun 30, 2004
Messages
170
Eeeh... Haven't used GUI in years; I don't know how to explain/do it without confusing you with Jass.

With what you're trying to do, the "Is Attacked" event will not work; you will need the specific unit event called "Unit takes damage". Events like this either need a preplaced unit or another event that will make the trigger for the unit after they are put on the map.

After that, you'll be able to find which unit took the damage, which unit dealt the damage, and the amount of damage the unit took.
 
Level 5
Joined
Jun 30, 2004
Messages
170
Eeeh... Haven't used GUI in years; I don't know how to explain/do it without confusing you with Jass.

With what you're trying to do, the "Is Attacked" event will not work; you will need the specific unit event called "Unit takes damage". Events like this either need a preplaced unit or another event that will make the trigger for the unit after they are put on the map.

After that, you'll be able to find which unit took the damage, which unit dealt the damage, and the amount of damage the unit took.
What I meant by that was that you need to trigger this part yourself. Any unit gets buff, create damage event for unit that got the buff.
 
Status
Not open for further replies.
Top