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

Deals more damage when low on health

Status
Not open for further replies.
Level 3
Joined
Apr 1, 2009
Messages
30
Howdy. I want to make my unit get more % damage the lower his health % is. For instance, if he loses 1% health he gains 1% in damage, or if he loses 50% of health he does 50% more damage, and so on. And after first trying to make a trigger myself (Im absolutely terrible at it, barely understand a thing) and searching the forums, Im still stuck. Can anyone help me?
 
Level 7
Joined
Apr 1, 2010
Messages
289
first you will need a damage detection engine
  • Display Damage
  • Events
  • Game - GDD_Event becomes Equal to 0.00
  • Conditions
  • level of (damage based off of health) for GDD_DamageSource = 1
  • Actions
  • set real1 = percentlife of GDD_DamageSource
  • set real1 = 100-real1
  • cause GDDDamageSource to damage GDD_DamgedUnit dealing 50*real1
this is how you would basically do it.
 
  • cause GDDDamageSource to damage GDD_DamgedUnit dealing 50*real1

that will crash the game...

this would do it...
  • Untitled Trigger 001
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (Unit-type of GDD_DamageSource) Equal to Blood Mage //this is only a sample...
    • Actions
      • Set MaxLife = (Max life of GDD_DamageSource)
      • Set MaxLifeRamainder = (MaxLife - (Life of GDD_DamageSource))
      • Unit - Cause GDD_DamagedUnit to damage GDD_DamagedUnit, dealing MaxLifeRamainder damage of attack type Spells and damage type Normal
 
Level 7
Joined
Apr 1, 2010
Messages
289
that will crash the game...

this would do it...
  • Untitled Trigger 001
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (Unit-type of GDD_DamageSource) Equal to Blood Mage //this is only a sample...
    • Actions
      • Set MaxLife = (Max life of GDD_DamageSource)
      • Set MaxLifeRamainder = (MaxLife - (Life of GDD_DamageSource))
      • Unit - Cause GDD_DamagedUnit to damage GDD_DamagedUnit, dealing MaxLifeRamainder damage of attack type Spells and damage type Normal

i wasn't using the world editor,(what would cause it to crash?)
on a side not
oh yeah and you have to turn off the damage detection engine then turn it back on Because if you don't warcraft 3 will crash because you caused an infinite loop (it will keep damaging the target unit.)
 
Level 3
Joined
Apr 1, 2009
Messages
30
Is it possible just to give him a +damage ability when lower than lets say 75%, give him a stronger one when below 50% and remove it again when he is over 50/75%?
 
Status
Not open for further replies.
Top