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

[Trigger] Armor of unit action?

Status
Not open for further replies.
Level 4
Joined
Jun 22, 2009
Messages
63
Im creating a spell called Heavy Armor. Basicly it reduces the movement speed of the targeted by 10 for every armor point. But i cant find a way to set a variable to the units armor.

EDIT: Is there a way to detect current damage of hero then? Or give for example +10 damage on every attack?
 
Last edited:
Level 11
Joined
Feb 11, 2010
Messages
199
One way is to damage a unit, feed the difference into the armor formula, instantly restore the damage, and figure out a unit's armor that way, like Pharaoh said.

Another possibility is to set all armor for units in your map to zero then add it with triggers by doing something like adding a many-leveled +1 item armor ability to units, setting the level to whatever amount of armor you want, then detecting the level of that ability.

:thumbs_up:
 
Status
Not open for further replies.
Top