Snippet GUI-Friendly Damage Detection

Weep

Godspeed to the sound of the pounding
Reaction score
401
Anachron from The Hive Workshop said:
A small map has at least 1000 units in a game, that would make 390kb leaks.
An bigger one, such as an TD, can easily reach up to 10.000 Units, which would be 3,9mb leaks. And that for every library that uses the RegisterDamageEvent method.
(emphasis mine)

Does this guy know what he's talking about? Have I missed anything leaky here?
 

Weep

Godspeed to the sound of the pounding
Reaction score
401
Lol, 3.9mb is nothing.
*shrug* For an app that'll take 5+ minutes to transfer a 3MB map over BNet, who knows...WC3 is, in the end, incomprehensible.

I'm still wondering whether this is 1. untrue, 2. some sort of entirely unavoidable leak with registering events, or 3. some sort of cleanable leak that A. I've taken care of (and the comment is irrelevant), or B. I've left in...
 

Weep

Godspeed to the sound of the pounding
Reaction score
401
icepig01 found something I needed to make note of. The variable event itself is not sufficient for the World Editor to correctly create the variables automatically - it won't create GDD_Event as a Real. Before copying triggers that use GDD into a new map, you'll need to copy GDD and its variable creator trigger. If you already did, edit the variable GDD_Event to be a Real, then fix the events for whichever triggers become disabled. I've updated the first post and readme in the attached demo map to mention this.
 

avalya

New Member
Reaction score
37
How do you mean? I imported the GDD Variable Creation trigger along with the JASS part without any problems, it created as a real as it was. Is it a problem if you already used any triggers that use GDD in them and THEN import GDD?
 

Weep

Godspeed to the sound of the pounding
Reaction score
401
Is it a problem if you already used any triggers that use GDD in them and THEN import GDD?
Right, it's only if you copy over some triggers that use GDD, before you copy GDD itself.
 

LearningCode

New Member
Reaction score
24
Someone should send this to icefrog, lol.
Might help him fix Axe's counter helix exploit. xD

Step 1: Trick everyone into pressing 'S' repeatedly when you call them.
Step 2: Do nothing
Step 3: ???
Step 4: Profit

This system has helped me a hell lot, I am one happy guy, thanks for sharing this.
 

Tru_Power22

You can change this now in User CP.
Reaction score
144
Someone should send this to icefrog, lol.
Might help him fix Axe's counter helix exploit. xD

Step 1: Trick everyone into pressing 'S' repeatedly when you call them.
Step 2: Do nothing
Step 3: ???
Step 4: Profit

This system has helped me a hell lot, I am one happy guy, thanks for sharing this.

How could you trick one one into doing that? Why?

Not t mention DotA allready has a damage detection system.
 

LearningCode

New Member
Reaction score
24
How?
Not in Garena, hell no.
But in LAN games with your friends and they're a bunch of gullible people.

Why?
Spamming 'S' makes Axe trigger off more helixes =x

DotA does?
Would have expected that =/
Still kinda' makes me wonder why icefrog allowed Axe's helixes to be slightly buggy.
 

Ayanami

칼리
Reaction score
288
Awesome damage detection system. Efficient and easy to use :thup:

Off topic: Axe's counter helix was made this way. Which idiot would be stupid enough to spam S when attacking an enemy? 0.o Makes no sense. Beside, allies can't trigger it. And plus, since Berserker's call can be stopped by pressing S. If Counter helix used Damage Detection system, having Berserker's call would be meaningless :nuts:
 

Weep

Godspeed to the sound of the pounding
Reaction score
401
I don't suppose there's a nice way to apply type detection to this? o.o
Same ways you'd do it in JASS (buffs on attack/setting globals), except you can't really modify the GUI functions so you can't automatically have it set damage type by calling different premade functions.

So, it's pretty much DIY. Based on the limitations, I'd probably consider a type-detection system built on this to be its own separate system, requiring GDD.
 

Weep

Godspeed to the sound of the pounding
Reaction score
401
Well, OK, hooking could work, but I'd rather keep this vJass-free for universal compatibility.
 

svenski

New Member
Reaction score
1
Excellent Job.

Thanks for this snippet of code! So useful!

I had a spell that was castable damage reduction on a target, but after casting it a few times on the same unit (the events were building up in the trigger restoring the lost health) and the unit would effectively start gaining health whenever it took damage!
 

canons200

New Member
Reaction score
50
i only have 1 question, is this MUI?
if i have many skill that are also require GDD, do i need to make all array?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
How would you make an array ?!
Of what ?!

No, this is of course MUI as it only needs to set some variables for an instant, while you do some actions...
Though you can't use waits, and then expect you to be able to use the GDD_ variables again, as they may have changed ;)
 

haxic

New Member
Reaction score
2
Yay! Intergrated this with my own trigger systems now... working beautifully, can do alot of fun stuff with this :) just wanna say thanks for sharing such a simple and imba system. Appreciated :)

(by simple I mean easy to use xD)
 

jhnam95

Active Member
Reaction score
12
wow this is just amazing...
i was trying to learn jass to do damage detection but this is amazing!
Erm... not that I'm not going to learn jass anymore x)

Anyway GOOD JOB and thanks :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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