• 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 prevention + Damage Detection.

Status
Not open for further replies.
Level 8
Joined
Apr 8, 2009
Messages
499
1. I need to find a way to block damage, but stil get detected how much damage was dealt. without JASS. [Solved]

2. How do i hide Ability buttons? (spellbooks?) [Solved]

3. Is it possible to let Spirit Link shift ALL damage taken to the other spirit linked unit? [Impossible?]


----------------------EDIT------------

4. how do i get devotion aura to actually give a x% armor bonus.
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,243
1. Use basic damage detection and calculate the unreduced damage based on the damage taken and reduction. Or you trigger the damage reduction giving some life back therefore damage taken will be unmodified by abilities.

2. You either base your spell on Channel and set Options - Visible to false. Or set the (passive) ability inside a spell book and hide the book with
  • For each (Integer A) from 1 to 16, do (Actions)
    • Loop - Actions
      • Player - Disable Spell Book - (evasion) for (Player((Integer A)))
 
Level 8
Joined
Apr 8, 2009
Messages
499
1. Use basic damage detection and calculate the unreduced damage based on the damage taken and reduction. Or you trigger the damage reduction giving some life back therefore damage taken will be unmodified by abilities.

does that mean that the unit will actuallylose health but get the exact same amount back again? cuz this won't work with lethal hits.
also i need it to block ALL damage, not just reduce it. and then stil be able to calculate how much damage would have been dealt.... >_<;



gonna try out the spellbook thing tho, thnx maker :3
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
does that mean that the unit will actuallylose health but get the exact same amount back again? cuz this won't work with lethal hits.
also i need it to block ALL damage, not just reduce it. and then stil be able to calculate how much damage would have been dealt.... >_<;

Blocking, reducing...same thing. It will work with lethal hits since "unit takes damage" event will fire before the unit takes damage.

Also one trick you might need is temporary max hp increase. Use item ability max hp bonus. Add the ability, set the level, remove it after a very short duration. Use negative values. There are systems for that.
 
Level 8
Joined
Apr 8, 2009
Messages
499
no clue as to what you actually mean to do o.o......
atm i have:

-a basic damage detect, but it can't detect damage because its 100% blocked.

-a basic damage detect, life is automaticly regained after damage is taken, lethal hits will kill.


--------EDIT---------------------

nvm, fully understand itnow, thankyou very much ^__^ +rep ofcourse for answering 2 of my questions.
 
Last edited:
Level 10
Joined
Jul 12, 2009
Messages
321
1. Use damage detection, add a large +HP ability to the unit, start a 0 second timer, and remove the ability when that timer expires (you can use a unit group to track any and all units that need the ability removed). This gives the unit a big boost in health to soak up the damage but still lets the damage event work normally.

3. I don't believe so.

4. When you set Devotion Aura to percent mode, it's a percent of the unit's base armor, excluding bonuses like contributions from agility. :csad: There's nothing you can do about that, I think. It could potentially be a triggered aura, but finding a unit's armor amount (to know how much to increase it) isn't that easy.
 
Level 8
Joined
Apr 8, 2009
Messages
499
4. When you set Devotion Aura to percent mode, it's a percent of the unit's base armor, excluding bonuses like contributions from agility. :csad: There's nothing you can do about that, I think. It could potentially be a triggered aura, but finding a unit's armor amount (to know how much to increase it) isn't that easy.

Wait, you mean that if the units base armor is 0, and it has 20 agility = 10 armor, it'll only see the 0 armor and base its percentage on that?
 
Level 11
Joined
May 26, 2009
Messages
760
This may not be optimal but you could have an integer which you trigger to increase/decrease the value of whenever a unit should gain/lose armor. Then you could base the % value off of this integer. Which means you run a parallel value to the armor because you can't detect the actual armor of a unit.
 
Level 8
Joined
Apr 8, 2009
Messages
499
This may not be optimal but you could have an integer which you trigger to increase/decrease the value of whenever a unit should gain/lose armor. Then you could base the % value off of this integer. Which means you run a parallel value to the armor because you can't detect the actual armor of a unit.

wait wait wait, i smell a good idea here but its a bit chaotic.

-set a integer to 1/2 = yes/no = armor boost/no armor boost

-set a real to specified units armor (probably just multiply current agility stats with armor granted per agi point.)

and then?

calculate a second real for the % armor... how do i give that xx armor bonus to specified unit? don't suggest a 100 level ability please ^__^
 
Level 8
Joined
Apr 8, 2009
Messages
499
Why not when it's the easiest way?

- Set level of ability Armor Bonus to Integer(RealPercentageArmor[#])

which means you'll have a lot of levels for the ability armor bonus o.0 .....
which will cause a minor freeze at first time usage and will drasticly increase loading time of the map. or so it has been said.

is it possible to change the bonus armor given to a int?

like,

Data - armor bonus: Integer_bonus[x]
 
Status
Not open for further replies.
Top