Damage Detection System Help

KingJohn

New Member
Reaction score
0
Hey guys,
first of all, NO, I don't want to rebuild "Borrowed Time" from DotA, I rather want some general advice about damage detection, this is just an example.

I tried to do a passive ability, which provides for example 10 hp regeneration every time an enemy unit attacks (doesn't matter how much damage is dealt).
I works with the event "a unit is attacked", but as you know, that's very choppy and ignores the attack animation.
So I tried to look through threads about "Borrowed Time" since it sounded familar, but always the only advice would be "use a DDS". So I tried to deal with one (for example this: http://www.hiveworkshop.com/forums/spells-569/gui-damage-engine-v2-2-1-0-a-201016/ ), but I can't figure out, how to implement my spell with the help of the DDS.
I only rec0gnized it produces the dealt damage as floating text, which isn't useful to me at all.

I am quite good with GUI and know how to remove memory leaks with custom scripts, but nothing more.
May someone please introduce me into damage systems, how they work and how to use them properly?

Thanks in advance!
 
Last edited:

jonas

You can change this now in User CP.
Reaction score
68
Is it for a hero? Just use the damage event and whenever a hero with that ability is created, register that hero for the trigger.

EDIT: or read the "How to Use" section in the tutorial that you referenced.
 

KingJohn

New Member
Reaction score
0
Thanks for the answer, this helped me to understand more.

Another question: In the DDS I linked, they are indexing units with custom values. I already have a "custom value system" running in my map (a creep revival system). Do these two interfere? If yes, what would be the best solution? Change the (more simple) creep revival system to one based on hashtables?
 

jonas

You can change this now in User CP.
Reaction score
68
They interfere. You could use their system for your purposes: add an array which you index with their index but that maps to your values.
 

vypur85

Hibernate
Reaction score
803
Have you not asked anyone from THW?
They're definitely more active there.
Besides, the author of the system is still active there.

Here, we have Weep's DDS. He was the pioneer I'd say.
But there are many variations of the method now.
All of which can be gotten from THW.

And to give a suggestion to your problem... you can try using the manual method of adding units to event.
This will leak and the people in THW hates this shit.
But to me, it's all good.

Trigger:
  • Attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Triggering unit) is in SomeUnitGroup) Equal to False
    • Actions
      • Unit Group - Add (Triggering unit) to SomeUnitGroup
      • Trigger - Add to Damage Taken <gen> the event (Unit - (Triggering unit) Takes damage)


Trigger:
  • Damage Taken
    • Events
    • Conditions
    • Actions
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Damage taken))


This is the generic version...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top