• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Detecting an attack?

Status
Not open for further replies.
Level 11
Joined
Jun 20, 2009
Messages
879
So how can i detect when unit is attacked? If i use
  • Unit - A unit Is attacked
it can be abused by cancelling animation.
I know how to use damage detection system but how can i detect is the damage an attack or some other source?
 
To further elaborate on ^, you would have to trigger all damage for all spells so that it would be using a different damage type. Damage detected that doesn't have a specified damage type could then be considered as damage coming from an attack.

Another way might be using orb abilities and giving them to all units so that they cause a buff when they attack, which you can detect with a damage detection system. I wouldn't really recommend this approach but it might be better if you don't want to trigger every spell.
 
Status
Not open for further replies.
Back
Top