• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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
 
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