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

[Trigger] count the number of times an unit attacked?

Status
Not open for further replies.
Level 18
Joined
Aug 23, 2008
Messages
2,319
I believe he wants to count the amount of times the unit took damage. Don't you need a damage detecting system for that instead of 'Unit is attacked'? Since I believe that 'Unit is attacked' only activated once, and will only activate again when the attacking unit stops attacking or attacks again.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
I never worked with a damage detecting system. But if I'm correct, there's a tutorial about it on THW. It's made to detect how much damage is done to a unit, but it can also be used to check if a unit is damaged at all. If you use that, you simply add an integer variable 'AttackTimes = AttackTimes + 1' to the trigger, so it you will count the amount of times a unit has taken damage, which you can use for whatever you want to use it for.
 
Status
Not open for further replies.
Top