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

[Trigger] no "is attacking" event?

Status
Not open for further replies.
Level 1
Joined
Feb 14, 2013
Messages
5
I've been looking through all possible events and cant seem to find a way to start triggers, when a unit attacks, only when a unit is attacked...
Is there a way to start a trigger when a unit attacks?

All answers and ideas are appreciated :cool:
 
Level 7
Joined
Nov 15, 2009
Messages
225
Hey!

Unit - Unit Is attacked

Runs when the missle starts.
Use Attacking Unit to refer back to the attacker.
Use Attacked Unit or Triggering Unit to refer back to the attacked unit.


Unit - Unit is damaged

Runs when the missle hits.
Use Attacked Unit or Triggering Unit to refer back to the attacked unit.
You can't refer back to the attacking unit.
 
Level 8
Joined
Feb 3, 2013
Messages
277
Hey!

Unit - Unit Is attacked

Runs when the missle starts.
Use Attacking Unit to refer back to the attacker.
Use Attacked Unit or Triggering Unit to refer back to the attacked unit.


Unit - Unit is damaged

Runs when the missle hits.
Use Attacked Unit or Triggering Unit to refer back to the attacked unit.
You can't refer back to the attacking unit.
^^ :) Always triggering unit.
Don't make this mistake though, a unit that is attacked has not taken damage yet - so if you use the Unit is attacked event and have a set of actions that fire afterwards, the trigger will run before the unit takes the actual damage of the attack. So if you are expecting it to run after a unit takes damage instead - you need to need to use Unit takes damage event, which is what most people are usually looking for.

Also the Unit is attacked is a general unit event, so it can refer to anyone while the Unit takes damage is a specific unit event. So you need to refer to a unit while using the Unit takes damage event.

But luckily for us, there are already a couple of great damage detection systems. Here's a good one actually - system
 
Status
Not open for further replies.
Top