You're right.I couldn't find any kind of function or something that returns the damage type of the damage taken.
The proper way is to do all damage but normal attacks with triggers.
Most of damage detection systems have some functions and thingies for supporting that stuff.
I can do it too!Well, then I can just quote myself:
If you're willing to give up the use of most, if not all, orb effects and buff-placers, give every unit a hidden ability based on, say, Slow Poison, and check whether the damaged unit has that buff (and if it does, remove the buff as the first thing in the trigger, of course.)
Hm. Well, Frost Breath works for Artillery and Missile (Splash), but not Missile (Line) or Missile (Bounce).That just dont work so well with AoE attack stuff. ( Mortar team for example )
That just dont work so well with AoE attack stuff. ( Mortar team for example )
Of course you could trigger that stuff too, but I dont know if it is worth of it just to get orb effect attack detection to work.
( Triggering ranged attacks with some projectile system is definelty worth of it, but for other reasons, though. )
Missile speed is constant, and is in the same units as distance, so a projectile with speed 600 will take one second to reach a distance of 600.Thing is that I can't understand how missile animation speed is calculated. In object editor there is missile speed. I thought that this is a constant but seems that when the hero gains additional attack speed (agility) the missile speed increaces as well... I've tested this with unit attacked-damaged trigger and a timer, and everytime my hero levels up the time that takes the missile to hit the target decreaces.
This is true for homing projectiles. If you disable Attack - Projectile Homing Enabled, it'll travel straight to the position of the target at the moment of attack, and will hit when it reaches it.I've seen units with high movement speed attacked by units with slow missile speed and if the attacked unit runs away from the attacker then the missile may need a several seconds to catch it.
TriggerSleepAction() is not very precise; you should look into timer systems.but seems like the functions in JASS are not that fast. I tested it and if I say the trigger to sleep the time I calculated the whole function executes with 100-150 ms delay which is alot.