• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Any way to detect casting event? Or detect auto attack?

Status
Not open for further replies.
Level 17
Joined
Jun 2, 2009
Messages
1,148
Hello everyone. I want to detect caster or attacker except of using it's own events. Is it possible?


Option 1: I need to detect caster "except of use event unit begins, channeling etc etc events"

OR

Option 2: I need to detect attacker "except of using units is attacked, attacking etc etc events"

OR

Option 3: I need to detect "AUTO ATTACK ONLY"

My objective is simply doing this

"your normal attacks (Your hero raises your weapon and hits the enemy. Only works for normal attacks. Except for damage done by abilities, skills, spells, other items with any effect like immolation or poison etc etc) deals additional 1.0x agility damage.

I have tried to do that with these systems.



 
Last edited:
Level 20
Joined
Aug 29, 2012
Messages
845
For option 1, I guess you could create a dummy unit X whenever ability Y is cast, and then detect whenever X enters the map, that means Y has been cast by a specific player.

That seems extremely convoluted though, why not using the dedicated events? Apart from that, maybe damage detection systems have ways to do what you want
 
Level 17
Joined
Jun 2, 2009
Messages
1,148
For option 1, I guess you could create a dummy unit X whenever ability Y is cast, and then detect whenever X enters the map, that means Y has been cast by a specific player.

That seems extremely convoluted though, why not using the dedicated events? Apart from that, maybe damage detection systems have ways to do what you want
Added third option.
For the new updates i can easily handle it with Damage Engine 5.9.0.0
But for a reason i need to make it work on previous versions. I am using this system GUI-Friendly Damage Detection v1.2.1
But it detects all kind of damage.

I have created item that adds extra damage based on their attributes. But trigger runs when they cast spells and other ways (if the unit activates immolation as well) and it ruins my system.

I just want do detect normal attacks OR EXCLUDE damage given by abilities.
 
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
5,034
If you can do it with Damage Engine... just use Damage Engine. I will try not to shit on you too much here but: why are you even asking this question? You know the best possible answer, and you know how to make it do what you want. Just... remove GUI-Friendly DD and implement DE.

There is no easy way to differentiate between attacks and abilities and passive item damage and whatever else without using the Runed Bracers trick that Bribe uses in DamageEngine (and GUI-FDD doesn't have). Since setting up all of that infrastructure for yourself would be pointless, just use the resource that already does it for you.

There is a compatibility build for DamageEngine you can find here: Damage Engine 3A.0.0.0 and 3.8.0.0
 
Last edited:
Level 17
Joined
Jun 2, 2009
Messages
1,148
If you can do it with Damage Engine... just use Damage Engine. I will try not to shit on you too much here but: why are you even asking this question? You know the best possible answer, and you know how to make it do what you want. Just... remove GUI-Friendly DD and implement DE.

There is no easy way to differentiate between attacks and abilities and passive item damage and whatever else without using the Runed Bracers trick that Bribe uses in DamageEngine (and GUI-FDD doesn't have). Since setting up all of that infrastructure for yourself would be pointless, just use the resource that already does it for you.

There is a compatibility build for DamageEngine you can find here: Damage Engine 3A.0.0.0 and 3.8.0.0
Yesterday i have downloaded previous version but still haven't worked on it.
By the way what is the Runed Bracers trick? It is the first time i have heard.
My objective is simply doing this

"your normal attacks (Your hero raises your weapon and hits the enemy. Only works for normal attacks. Except for damage done by abilities, skills, spells, other items with any effect like immolation or poison etc etc) deals additional 1.0x agility damage.

And i think somehow we can do this with vanilla editor or at least with GDD system. If we have an opportunity to detect any type of damage done, that means we can detect right click attack. Or at least i want to believe that.
 
Level 39
Joined
Feb 27, 2007
Messages
5,034
By the way what is the Runed Bracers trick? It is the first time i have heard.
When damage is taken from basic attacks or spells (basically every single damage type), the system's main function "OnDamage()" is called.
This one calls the onDamage event.

As in the map, all units are given the spell "reduction" ability, the spell damage is actually the negative value of the original amount.
This means that all negative damage is spell damage and all positive damage is physical damage.
The system itself multiplies the spell damage with -1 so the damage will be positive again.

The problem with UnitDamageTarget() is that the system detects it as normal damage done by normal units.
 
Level 17
Joined
Jun 2, 2009
Messages
1,148
@Pyrogasm Downloaded previous version, experimented on it but nothing changed.
  • Events
    • Game - DamageEvent becomes Equal to 1.00
  • Conditions
    • (DamageEventSource has an item of type Claws of Attack +15) Equal to True
  • Actions
    • Trigger - Turn off (This trigger)
    • Unit - Cause DamageEventSource to damage DamageEventTarget, dealing (1.00 x (Real((Agility of DamageEventSource (Include bonuses))))) damage of attack type Chaos and damage type Unknown
    • Trigger - Turn on (This trigger)
Or i don't know how to do that. When i cast blizzard, it adds 1x agility damage and deals damage.
 
Status
Not open for further replies.
Top