Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
and input conditions (range or melee or whatever)
and then actions.
The Unit - A unit Is attacked event refers only to units that are attacked.
No spell or buff damage.
I know how to create a simple damage detection system, but I don't have an idea of how to detect if the damage is physical or not. Just a simple code in GUI will do, please.
a easy way (same time hard way if u use alot default warcraft 3 damage dealer ability)
-rework blizzard spells to your own, its mean instead useing warcraft 3 firebolt/blizzard you make your own (because then u must trigger the damage with trigger for abilities, this have more positive factor too, because example damage could be lv/stat depend too)
-set DamageEventType at every trigger ability on your map before trigger the damage
something like:
Set DamageEventType = 1
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((Real(((Intelligence of (Triggering unit) (Include bonuses)) x 10))) + ((Real((Level of (Ability being cast) for (Triggering unit)))) x 5.00)) damage of attack type Spells and damage type Normal
//in this example trigger unit to deal int * 10 + ability level * 5 spell damage to ability target
note: you can set any number to DamageEventType just not 0
-at SetDamageTrigger (what is in bribe dds) just check the DamageEventType value, and if it is 0 then it was autoattack
and input conditions (range or melee or whatever)
and then actions.
The Unit - A unit Is attacked event refers only to units that are attacked.
No spell or buff damage.
There is also another way that I used to use as an alternative in the past, back in the days I am too stubborn to use any damage engine.
Basically you will need 2 triggers for registering units on the map so that you can run the Unit - Damaged trigger later. When a unit is attacked you will run a 0.3 - 0.4s timer and when it expires check if the attacked unit has taken damage > 2 or not, if yes then it has taken physical damage. The method itself is pretty self-explanatory so I don't post any examplary trigger.
Remember, this method is one of the most stupid ways ever to overcome your issue. It is just like walking to a place instead of catching a taxi (using a damage engine as shadowvzs pointed out).
The method I've used is to give all units a buff placer ability (for example slow poison). Then use a damage detection system (for example Bribe's damage engine)to detect the damage:
Events
DamegeEvent becomes 1.00
Conditions
Actions
if DamageEventTarget has a buff (custom buff) then
//damage is physical, you can do the corresponding actions here
//don't forget to remove the buff
else
//damage is magical, do corresponding actions
Note that with this method you can't use buff placers or orb effects in your map. However, there aren't many of them and you can trigger them.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.