• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

"cause unit to damage target" with negative numbers

Status
Not open for further replies.
Level 2
Joined
Aug 11, 2009
Messages
22
Hi guys,

I'm having some problems with this trigger. Negative numbers, and therefore healing a unit, only work in a specific combination of attack and damage type. This is attack type Spells and damage type Normal or Magic. The other combinations result in nothing. I'm casting the spell on a regular unit without any immunities and didn't change the attack type table constants (well I did, but only like 70% instead of 50%, so no immunities there either). Is this a known issue or am I missing something obvious? I couldn't find any information on that...
Cheers
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
First of all dont use "damage unit" when you want to heal.
Use "Set (unit)'s life to (Life of (unit) + value)"

The (negative) damage could be negated becauce the unit is (temporary) invulnerable or resists that damage type. Thats why you have to tell what damage type your attack is.
Negative physical damage is not allowed by WC3.

However you can do it via a Damage Detection System.
(What a coincidence that I am just writing one.)
 
Level 2
Joined
Aug 11, 2009
Messages
22
Ok, thanks. I stumbled upon those detection sytems while searching for an answer, might implement it. The reason why I didn't want to use "Set unit's life to..." is that it can get complicated when I have different spells or events, which increase or decrease the amount of heal - might it be percentage based or a certain value - dealt to a target. I'm aware of the method though and used it as a workaround for now.
 
Status
Not open for further replies.
Top