• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Cleaving Strike

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
I need help.

I'm trying to make a custom life steal and few more abilities that will activate onDamageTaken (DDS). i can make that.

Now. When I'm using cleaving strike, that triggered spell activates for every unit that has been damaged (and in cleaving's case, lotsa units are damaged).
I want it to activate only on unit that the hero hit, not including cleaved enemies.

Anyone has any ideas?
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
A DDS cannot tell the difference between damage taken from basic attack hits, splash damage and bounces.

You have to create an exception on your DDS for Cleaving Attack... and indeed trigger it yourself.
Otherwise... create your own damage engine.

This is one of the reasons why I don't use a DDS.
 
Level 10
Joined
Jan 20, 2011
Messages
492
are you using a DDS from hiveworkshop (like bribes) or your own? Cause most of the ones on Hiveworkshop you can just turn them off for when you trigger damage (if you make a custom cleave spell)
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
But that is not what he wants.
For example, you put a unit in combat when he takes damage or deals damage... now cleaving attack doesn't do that. (There are more crucial and better examples but you might figure it out yourself.)

You don't have to make the difference between detecting damage and not detecting damage but the difference between physical spell damage and basic attack hits.
The easiest solution could be that the system provides an exception case, but I doubt it.

I suggest you to make a variable (boolean) and name it "On_Hit_Effect".
When you deal damage with cleaving attacks, you set that boolean to false and back to true when you have dealt the damage.
Now go to EVERY SINGLE EFFECT that you made that responds to basic attack on hit and check if that boolean is true.
I know this is stupid but it is just how a DDS works.

For how to trigger Cleaving Attack.
Pick every unit in ... range of target and check if they are alive, no structure and enemy of attacker.
If all are true, deal ... damage to them.

You will probably find yourself stuck up in a non-looping DDS (I thought that there was one that actually allowed looping damage but couldn't find it again.)
In that case, you must save your damage and stuff in variables and set the damage back to the variable that you made.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
As I understand:
He has passive "Cleave" normal war3 cleave
He has passive "Custom Life Steal" triggered, activates with DDS
The problem is not that the "Custom Life Steal" activates from spells or other stuff, the problem isthat the "Custom Life Steal" activates for every unit cleaved, and he wants it only for the main target.


Am I correct ?
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
I know.

What BloodDrunk wants is that his life steal only works on on-hit physical damage.
This means basic attacks and maybe a few spells.
The problem is that a DDS cannot tell the difference between on-hit physical damage and physical spell damage (units hit by cleave).

To fix it, you need to trigger cleave attack and keep up a boolean which tells which attacks are on-hit and which arent.
There is nothing else to do.

You cannot turn the DDS off because of that there are so many things that rely on it. If it is turned off, a unit is dealt damage, dds is turned on, then you are seriously destroying your map.
So either trigger cleave or do not use it.
 
Status
Not open for further replies.
Top