HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Damage Detection

12-06-2009, 02:14 PM#1
ploks
Hello, since I'm starting a mapping project (which will probably never be finnished) I'm wondering which DamageDetection system I should use as there is a lot of them in the resource section.

Damage Event and Modifiers by Anitarf

IDDS by Rising Dusk

LLDD
by Captain Griffen

Unit Recycler and Simple Damage Detection System by Moyack

I've understood that IDDS can say whether the damage came from an attack or from a spell. Can the other systems do that? Should I choose system depending on other systems I'm about to use, for example a buff system or XE?

Thanks in advance Ploks
12-06-2009, 03:20 PM#2
grim001
Use IDDS if you have triggered all spell/ability damage on your entire map. It also lets you create custom damage types.

Use Damage Event and Modifiers if you need to modify incoming damage and you like/understand extends.

Use LLDD if you just want basic, clean damage detection.

Use the Unit Recycler one if you want to recycle units, I guess, although I've never used it myself.
12-06-2009, 03:36 PM#3
moyack
Quote:
Originally Posted by grim001
Use the Unit Recycler one if you want to recycle units, I guess, although I've never used it myself.
I offer in the same thread the DD only if you don't need to recycle units.


Link.


Just to clarify.
12-06-2009, 03:53 PM#4
Rising_Dusk
Really, I would pick the system based on syntax. Which makes the most sense / is easy enough to figure out. DamageModifiers and UnitRecycling can be backwards rigged to work with the IDDS or LLDD, so if you want any of their features but don't like their syntax, it's not the end of the world.

It's really up to preference, though. Just glance over their documentations and see which best matches how you want to code your map. What they can do is important too, don't get me wrong, but make sure it's written in a way that you can understand it first.
12-06-2009, 06:42 PM#5
ploks
Thanks for the massive response by all the pros here on wc3c! I'm trying to understand Damage Event and Modifiers, but I'm not succeding as I have no knowledge in function interfaces, which I think is used in this system. Can a kind person just to a little display Dmg in a BJDebugMsg(). That would be lovely :) -Ploks
12-06-2009, 06:57 PM#6
Anitarf
Collapse JASS:
library DamageDebug initializer Init requires DamageEvent

    private function DamageMessage takes unit damagedUnit, unit damageSource, real damage returns nothing
        call BJDebugMsg( R2S(damage)+" damage dealt to "+GetUnitName(damagedUnit)+" by "+GetUnitName(damageSource)+"." )
    endfunction

    private function Init takes nothing returns nothing
        call RegisterDamageResponse( DamageMessage )
    endfunction

endlibrary
12-07-2009, 06:21 AM#7
ploks
Thanks for the help everyone :) That little DamageDebug library helped a lot!