• 🏆 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!

1. detect attack hit 2. detect point of attack

Status
Not open for further replies.
Level 7
Joined
Jan 30, 2011
Messages
267
Level 10
Joined
Jun 6, 2007
Messages
392
1. Unless you want to trigger all the spells in your map, the easiest way is to give all units a passive buff placer (based on e.g. slow poison). Use damage engine to check when a unit is damaged. If it has that buff, damage is from an attack. Also remove that buff in the trigger.

The problem of this method is that you can't use buff placers for other purposes. However, triggering them is easy in most cases, much easier than triggering every spell.

2. I didn't fully get what you mean with this question, isn't it basically same as 1?
 
Level 7
Joined
Jan 30, 2011
Messages
267
1. your answer on my question is basically very helpfulll but its the same like the way explained in the link, and i asked for another way
2. its not the same for ranged attackers
lets take an archer for example:
"unit is being attacked" fires when the archer begins its attack
"unit takes damage" fires, when the attack lands
but theres no event that triggers, when the arrow is launched
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
its hard to get the event using damage engine when only attack order is available for ranged unit but you may try this:
  • Custom script: if GetUnitCurrentOrder(yourunit)==851983 then
  • ======your actions here
  • Custom script: endif
851983 is an attack order so using a damage engine like GDD doesnt fire on every damage but on attack
only but that will bug on ranged units coz the order of ranged is not as instant as melee ones...
 
Status
Not open for further replies.
Top