• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Damage reduction & death prevention

Status
Not open for further replies.
Level 7
Joined
Jun 14, 2009
Messages
235
I'm wondering how you would prevent damage... (E.G. This unit takes 50% less damage). I just read that you use a damage detection system... and then heal it... but would that work if say you have 100 hp, and you take w 175 dmg. you have 50% reduction, wouldn't it still kill you?

Also, how do you "prevent death"? like you just stay at really low health, and don't take damage from attacks or spells.
 
Level 14
Joined
Aug 31, 2009
Messages
775
Yes, damage prevention has the issue of making a unit take damage and then artificially prevents that damage by actually healing it back.

As a work around, you could for example instantly replace the killed unit with a new unit with the correct health expected from the damage reduction. Unfortunately, this can have side effects such as still awarding experience/bounty/giving kills or whatever as the unit has in-fact been killed.

Alternatively, you can use the Hardened Skin ability (which reduces damage taken by a fixed amount) for direct damage from normal sources or a variation of the Anti-Magic Shell for magical damage.

You can use the famous Disabled Spellbook technique to hide the icon of the Hardened Skin so that it doesn't appear also.
 
Level 7
Joined
Jun 14, 2009
Messages
235
Yes, damage prevention has the issue of making a unit take damage and then artificially prevents that damage by actually healing it back.

As a work around, you could for example instantly replace the killed unit with a new unit with the correct health expected from the damage reduction. Unfortunately, this can have side effects such as still awarding experience/bounty/giving kills or whatever as the unit has in-fact been killed.

Alternatively, you can use the Hardened Skin ability (which reduces damage taken by a fixed amount) for direct damage from normal sources or a variation of the Anti-Magic Shell for magical damage.

You can use the famous Disabled Spellbook technique to hide the icon of the Hardened Skin so that it doesn't appear also.

k thanks for responding :D
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
I just read that you use a damage detection system... and then heal it... but would that work if say you have 100 hp, and you take w 175 dmg. you have 50% reduction, wouldn't it still kill you?

Also, how do you "prevent death"? like you just stay at really low health, and don't take damage from attacks or spells.
The best method is to add an ability that raises the unit's max life to a large number then use a timer that expires in 0 seconds to make the unit have the correct life. The same can be said for preventing death.
 
Level 7
Joined
Jun 14, 2009
Messages
235

Yah i saw that, but it didn't answer my main question about if it would actually prevent the death of a unit.

The best method is to add an ability that raises the unit's max life to a large number then use a timer that expires in 0 seconds to make the unit have the correct life. The same can be said for preventing death.

So i would add the ability, giving it like 10000 hp, then remove it, and set it to the correct amount?
 
Status
Not open for further replies.
Top