Damage detection triggers

Status
Not open for further replies.
Level 14
Joined
Nov 4, 2006
Messages
1,241
Hi guys,

i recently stumbled upon the following event:

  • Unit - A Unit takes damage
there are also several responses to it, like you can refer to the damage taken (real value), damage source, damaged unit

i did some quick testing and it seems to be fairly accurate, with the exception that when you kill a unit it detects the damage you would have done instead of the remaining hp of the unit

Anyone uses it, can it somewhat replace a damage detection system? any known bugs?
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
So the reason for Damage Detection systems being created in the first place was 1) The Events were only available to Jass users. 2) To make Damage Events easier to control/manage.

Here are the original Jass-only Events:
JASS:
EVENT_UNIT_DAMAGED
EVENT_UNIT_DAMAGING
And the new GUI Events:
JASS:
EVENT_PLAYER_UNIT_DAMAGED
EVENT_PLAYER_UNIT_DAMAGING

EVENT_PLAYER_UNIT_DAMAGED:
  • Unit - A unit Takes damage
EVENT_PLAYER_UNIT_DAMAGING:
  • Unit - A unit About to take damage
What's different about the Jass/GUI Events? I'm not 100% sure to be honest, but I think it's safe to assume that they're almost identical. I know they use the same Event Responses and I know the GUI Events work fine from personal experience. Hopefully someone with more experience like @Bribe could explain the differences.

Edit:
To answer your questions, yes, and I don't know of any bugs. That being said, it's probably best just to use Bribe's Damage Engine as it covers basically every issue you could possibly run into when dealing with this sort of thing.
 
Last edited:
Status
Not open for further replies.
Top