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

How would one block incoming damage (greater than unit's max life)?

How would you (as a coder or user) block the incoming damage?

  • Add an ability (hardcoded) that blocks all sources of damage

    Votes: 2 40.0%
  • Add a health ability and remove it after 0. seconds

    Votes: 2 40.0%
  • Add a health ability and remove it after life-change event (not equal)

    Votes: 1 20.0%
  • Add a health ability and remove it after life-change event (greater than or less than)

    Votes: 3 60.0%

  • Total voters
    5
Status
Not open for further replies.
Level 4
Joined
Dec 22, 2016
Messages
67
wouldn't be easier to just use a damage detection engine (like bribe's or etc.) ?
check if the damage is greater than unit's max life (with options of your DDS) and if its greater than units max life , change it to whatever you want.
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
If you want to make your own DDS, this is the way to go:
"Add a health ability and remove it after life-change event (greater than or less than)".

IIRC, "Add a health ability and remove it after life-change event (not equal)" will not work.
This "Add a health ability and remove it after 0. seconds" will mess up GetWidgetLife inside callbacks.

There are however some few issues with "Add a health ability and remove it after life-change event (greater than or less than)" such as not being able to detect very little damage so this is the workaround I used (it's not perfect though).
 
Thanks for those votes. I created this poll solely for figuring out what is the most preferred option for coders either when coding their own DDS or using another coder's DDS.

I'm actually using the greater than or less than life event for all sorts of damage. However, I haven't added the spell distinction capability but that should be reserved for another thread.

EDIT:

The poll has been reopened.

Before:

Scenario involved blocking damage greater than one's own but less than a certain number.

Now:

Scenario now considers the immense amount of damage dealt...
 
Last edited:
Status
Not open for further replies.
Top