• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

Detecting an attack?

Status
Not open for further replies.
Level 11
Joined
Jun 20, 2009
Messages
880
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?
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
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.
Top