• Check out the results of the Techtree Contest #19!
  • 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 void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Real/Integer for armor

Status
Not open for further replies.
Armor are not accessible via trigger editor without using a complicated script or memory hack, as far as I remember of.
Would it be possible to damage the unit with physical damage, using a DDS, calculating the reduction and reverting the units health. I tried it once using Bribe's damage engine and it worked really nice, but there are obviously some downsides to it. A damage event will be fired, which usually would not happen, so you have to make sure, that it does no conflict with other triggers.
Some abilities (mana shield, spirit link, spiked carrapace, ...) do not work with this method, but I think you could design your map, so that it still works.
The problem though is, that it's not reliable, because it won't work with etheral units for example.

I guess calculating armor from upgrades/buffs/items/abilities/base armor could work, but it requires a lot of work to store all this data.
 
It is possible with a damage detection system and using armor formula. It's just a lot more involved than a simple getArmor

Algorithm:
1) Remember unit's HP
2) Set unit to full HP
3) Deal 1 damage with chaos type damage
4) Measure unit's hp difference
5) Set to old HP
6) Calculate armor based on armor formula and damage taken based on percent of 1
 
I was already trying to create a system, but no success. I tried your idea but I got stuck in the "4) Measure unit's hp difference" then I don't know what I did that crashed the game. Would be asking a lot if you could send a print or something showing of how this trigger should be?
 
Status
Not open for further replies.
Back
Top