• 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] Hack and Slash

Status
Not open for further replies.
Level 10
Joined
Nov 23, 2006
Messages
592
Hello,

I need to know, how to make units attack only when i right click on another units a to make it attack only once and then stop.

Second think is how to make ability autonaticali casts on next attack and it's target, so there is no need to target that ability itself. Thx
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
But if a unit is issued to stop, it will just continue to attack after about half a second. I hate solving such problems because they are kinda irritating and tricky. You would have to have an event that fires when unit A is issued to attack unit B and then order it to stop, but not directly, because that won't work, so after about 0.10 seconds (which is actually ~0.27 seconds). That would be for not letting it attack, but for the attack once thing, you should first make another trigger that will check hits (a unit is damaged) and with that you should check for the first hit and block all the other ones.
 
Level 17
Joined
May 6, 2008
Messages
1,598
  • Attack Once
    • Events
    • Conditions
    • Actions
      • Unit - Order (Your Unit) to Attack Once (Enemy)
 
Status
Not open for further replies.
Top