Is there some limited in the Damage detection system?

DarkBELL

New Member
Reaction score
1
I use the Damage Detection snippet founded in this forum in my map, it work fine for quite a number of skills, so I'm pretty sure that it can precisely detect the unit that is damage and can work even not on solo-basis

However, there is one hero where I trigger a skill that give him Bonus Damage if the Damaged unit have a specific buff and that the Damage source also have a specific buff

When I test it out, when the projectile (It's a range hero) reach the target, Warcraft III immediately closed itself. So I want to know is there a limit in using the Damage detection system? or have anyone met the same problem as me?

Right now, I'm temporary using the "Unit is Attacked" Event response instead of the Damage Detection System
 

Ryushi

"I will stand, or I will fall. I will not sit."
Reaction score
59
Are you causing damage to be dealt in your trigger that detects damage? If you are, when it deals damage, it will fire the trigger again, which will deal damage again, which will fire the trigger again, creating an infinite loop. You can avoid this by turning the trigger off before you deal damage, and turning it back on after.
 

DarkBELL

New Member
Reaction score
1
Sorry for Bumping, but one more thing, is it possible to detect in a Damage Detection system that the Damage detected is from a physical attacks and not from a spell?
 

Ryushi

"I will stand, or I will fall. I will not sit."
Reaction score
59
There's no simple way to do that. One way to do this would be to trigger all your spells to deal damage with dummy units, then if the damaging unit is a dummy unit, you know the damage was from a spell. If the damage wasn't dealt by a dummy unit, you know the damage was physical.
 

Ignitedstar

New Member
Reaction score
1
Actually, there is an incredibly simple way to do it. Create a global boolean made specifically for turning on and off whenever you use a spell. If the spell is doing damage, set that boolean to true. In your damage detecting trigger, make an if/then statement asking for if the boolean is set to true. If the boolean is set to true-- well look at that, you just found out whether the unit did damage from a spell. This last part is important: At the end of your damage detection trigger, make sure it turns that same boolean back to false, otherwise the trigger will bug. Since you never changed the boolean to false, it'll keep thinking that every damage thereon after wards is spell damage.

Since damage detection works per instance, the trigger will be turning the boolean to false immediately. You'll never had to worry about this failing you unless you put waits in the damage detection trigger (I don't know why you would do that in the first place, though).

How I know it works: I do this in my own map to find the difference between spell damage, physical damage, pure damage, healing, and other types of damage. I've had the trigger fire thousands of times, even for AoE spells that will hit 20+ units. It works every single time.
 

Ryushi

"I will stand, or I will fall. I will not sit."
Reaction score
59
That still leads to the problem that all spell damage must be triggered, which is the reason that there's no simple method. There's no simple way, for example, to detect if damage dealt was from the ability Storm Bolt, or from another ability.
 

Ignitedstar

New Member
Reaction score
1
All you would have to do is make a new trigger and each time the spell is cast-- ANY spell, you set the boolean to true. Damage detection will still treat it as spell damage.

Spell Shield would make it a different story, though.
 

Ryushi

"I will stand, or I will fall. I will not sit."
Reaction score
59
Storm Bolt does not deal damage instantaneously. A unit could cast Storm Bolt, and then another unit could attack before the Storm Bolt deals damage. the attack would then count as physical damage. There's also abilities that deal damage over time, only the first damage dealt would count as spell damage.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top