Events: Unit - A unit gets damage Conditions: ((Damage Source) has buff .... ) Equal to True Actions: Unit - Create 1 ... for (Owner of (Damage Source)) at (Position of (Damage Source)) facing Default building facing (270.0) degrees Unit - Order (Last created unit) to Attack (???? (there is no opposite of damage source))
Umm, Ramza, I tried it myself. If the (Damage Source) is the unit inflicting the damage, (Triggering Unit) is the unit damaged by the (Damage Source). I tried to remove (Triggering Unit) in a trigger with such an event and it worked.
NOTE: This doesn't apply for UMSWE "An Unit is Damaged". If you are using it, then you're wasting your time trying to find the oposite.
And yes, "Unit is Damaged" works for spell damage too. I tested it with Flame Strike.
"Unit gets damage", "Unit is damaged", where do you found these events? The unique event like that is the "A unit takes damage" but works only for specific units! I think that blizzard must to do this event for generic units too
Umm... About UMSWE/WEU I meant "Any unit is damaged" indeed. It refers to any unit, not a specifical.
As for the "works for spell damage too" I meant "A unit takes damage". I don't really take the EXACT event, because there aren't any others to mess it up with.
Hmmm i've figured out a rough way to may something like this owrk 99% of your attacks and maybe even more depending on your attack speed. And i've done it without the boost of WEU. Mine's just moreso based off of figuring out a unit you're attacking then assigning them as a global variable, then checking for that variable taking dmaage. It's worked for me and the only problem i could ever see is when my hero attacks before their missile hits which in my maps is rarely-never. I can post my map later and you can see for yourself, i've figured a way to make multiple orb abilites at the same time.
I didn't understand this method well but I'll like if you send the map to see. But the another way to wait a time basing in the distance between the caster and the target divided to the speed of the projectile works perfectly too.
i've figured a way to make multiple orb abilites at the same time
In a sense, yes. The reason, it's not actually linked to your hero, it's kind of like a secondary unit that casts the effect when you damage a target with your attack. As such it isn't linked to your attack directed so can't be overriden, plus it's not hard to trigger it this way since each effect is actually linked to a dummy spell. The thing doesn't lag mind you, and the game doesn't see it as an orb effect. As such it can be stacked since it doesn't actually replace an attack. This method can allow you to have has many orb effects as you desire. Still if you wan't it to override then you have to use a dummy spell as something that generally will overide orb effects when activated, like searing arrow, for example. I'll get the map up soon so yuo can see.
I think the best thing to do is make a sphere ability that has the projectile you want, then at the "unit issued command" event, give him the sphere. If it gets disrupted you have to take it away, but then when a spell targets a unit or point, a projectile will shoot out (you can use Channel for this).
Then, the "Starts the effect of an ability" event will be triggered when the projectile hits the unit.
back to the topic of the unit's distance to when the projectile hits:
I would make the projectile a dummy unit and the spell a dummy spell, and then i would trigger it so that a dummy unit comes out when the spell is inisiated, then i would trigger it so that the dummy unit is ordered to attack the targeted unit. (dummy unit's range is very small), then make another trigger to see when the dummy unit attacks the targeted unit and remove or kill the dummy unit and then the rest is whatever you want it to be. This was theorized in 5 minutes so it may not work but i am pretty sure it works.
I actually found out something relatively simple for this that you can use without triggers.
Some of the spells like stuns have a BUFF field, and you can make a custom buff with an animation effect on it (with whatever attachment points you want) and link it into that abilities "BUFF" field. The "BUFF" gets applied to the target of the spell when it gets physically hit by it.
Like I just used Fireball and made it into a Pyroblast spell. I wanted them to get hit with an explosion. Well, normally by default it just shows a stun icon when this spell hits. I made a Pyroblast buff, and gave it an explosion animation, and then gave the Pyroblast ability the Pyroblast buff. Everytime I use the pyroblast and at the moment the fireball connects to the target it shows that animation effect of an explosion.
It must be something like this but still if you want to make it perfect you have to make it better
In the custom spells the storm bolt has a missile speed
Lets say missile speed is 700
when event: "A unit starts the effect of an ability" conditions:Ability being cast equal to stormbolt actions:Wait (Distance between casting unit and target unit of ability being cast/700) that should do it.
example:Cast range is 1400 and missile speed is 700
the trigger will be activated in 2 seconds
but if the unit moves it still will be activated in 2 seconds so...
if you want to make it better you have to make another trigger in progress
a trigger that will be deactivated and activated when spell trigger occurs:Example "trigger:Turn on "Distance Counter"
the Trigger will be on and then Periodic Time:every 0.01 seconds it will set a variable as set tempDistance=Distance between unit(1) and unit(2) and so the trigger can be perfect.
the Trigger will be on and then Periodic Time:every 0.01 seconds it will set a variable as set tempDistance=Distance between unit(1) and unit(2) and so the trigger can be perfect.