HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Detecting units hit by AOE abilities?

12-07-2009, 04:45 AM#1
SmileyJeff
Hi all! I have a few questions other than the title. Its been awhile since i came back here.

1. Is there a way to detect units hit by AOE ability? For example Blizzard?

2. What happen to the "search" in wc3c? I can't find it anymore.

3. This question has nothing to do with criticizing the tutorial. I am just confuse and hope if someone could clear my doubt.
This Hashtable and MUI tutorial over at Hiveworkshop.

There is one thing i don't get it. RemainingTime is global var. So if i cast a 2nd healing over time within 10seconds. the 1st unit who benefit from it will get have its Healing over time reset to 10? Since storing the hashtable value to a global var which is 10 and it will reset the condition. Correct me if i am wrong. Am i right?

Thanks in advance to those who help [:
12-07-2009, 05:25 AM#2
TheKid
Quite the distinguished road.

Go to "Forum Tools" in the forums to find the search field.

With certain types of abilities (the ones that give buffs, such as Thunder Clap) you could enumerate all the units within the area of effect (spell target location as the center, the range of the spell as the radius of the circle) and then add 100-200 for the maximum collision size (because area of effect spells use collision to gather affected units). Now, once you have gathered all of the units within the area of effect into a group, you can check to see whether or not they have the buff.

The units who have the buff are the ones affected by the spell... it depends what you're using it for though. You gave blizzard as an example so... are you trying to add some sort of effect to the blizzard spell damage?
12-07-2009, 06:04 AM#3
SmileyJeff
I am trying to make a custom spell.
A passive Bleed, a chance to bleed enemy units. This passive spell affect all other active abilities.
Example i have an active Cleave, Those enemy who are cleave will have a chance to let the bleed apply to them. But i have no idea how to detect units that are cleaved.

Note: This cleave is not a passive spell.
12-10-2009, 12:13 AM#4
TheKid
Well it would be different for every spell. You could potentially have every spell inflict a buff of some sort. Then using a damage detection system you could detect when a unit is damaged, and which buffs it has (determining which abilities it is being affected by).

You should check out some Damage Detection systems in the resource section, perhaps it will enlighten you to other ideas.
12-10-2009, 05:09 AM#5
Avenger
What spell did you base cleave on?
12-10-2009, 11:39 AM#6
Anitarf
I'm assuming you want your passive ability to have a chance to cause bleed whenever the hero deals damage to an enemy. If that is indeed the case, you need to use a damage detection system.
12-10-2009, 12:08 PM#7
Anachron
You can detect whether an unit is damaged, however, you can not detect if it was damaged by blizzard. (Ok you can by getting the damage source and checking the spells it casted but that's resource draining)
12-10-2009, 12:29 PM#8
TheKid
Quote:
Originally Posted by Anachron
You can detect whether an unit is damaged, however, you can not detect if it was damaged by blizzard. (Ok you can by getting the damage source and checking the spells it casted but that's resource draining)

If you read my post it pretty much says the exact same thing but in more detail.

Quote:
Originally Posted by Anitarf
I'm assuming you want your passive ability to have a chance to cause bleed whenever the hero deals damage to an enemy. If that is indeed the case, you need to use a damage detection system.

Quote:
Originally Posted by SmileyJeff
Example i have an active Cleave, Those enemy who are cleave will have a chance to let the bleed apply to them. But i have no idea how to detect units that are cleaved.

Note: This cleave is not a passive spell.

I don't think its a passive on-attack ability, Anitarf.
12-10-2009, 02:35 PM#9
Anitarf
Quote:
Originally Posted by TheKid
I don't think its a passive on-attack ability, Anitarf.
Maybe you need to re-read his entire post, then, rather than just the part you quoted.

Quote:
Originally Posted by Anachron
You can detect whether an unit is damaged, however, you can not detect if it was damaged by blizzard. (Ok you can by getting the damage source and checking the spells it casted but that's resource draining)
That is far from being resource draining.
12-10-2009, 03:57 PM#10
DioD
just trigger blizzard.

its just SFX + damage every second.
12-10-2009, 05:04 PM#11
SmileyJeff
thanks for all the replies!

I wanted to make an active cleave, like diablo 3's babarian. And then bleed is my passive ability that affects other spell for my hero.

I manage to do it and solved my problem. I recoded every spell so that i can track them myself individually. Thus making my passive spell easier. I based my cleave on berserk for now. Because i want to simulate hack and slash game playstyle where it will get the angle of the mouse and do their stuff :D

Once again, thanks to all those who tried to help! If only i can +rep to everyone at once ><
12-10-2009, 11:12 PM#12
TheKid
Quote:
Originally Posted by Anitarf
That is far from being resource draining.

Haha, I was going to say the same thing.