• 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] Ability Clicked event

Status
Not open for further replies.
Level 30
Joined
Feb 18, 2014
Messages
3,623
Maybe something like this:

Events:

A unit is issued an order targeting an object
A unit is issued an order targeting a point
A unit is issued an order with no target

Conditions:

Issued order Not Equal to (move)
Issued order Not Equal to (attack)
Issued order Not Equal to (smart)
Etc...

Actions:

Do what you want here

Edit: Or you can check when a unit loses mana (if the ability cost mana though)

Edit 2: Actually, you can just use "A unit starts the effect of an ability" I totally forgot about that! :p
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,871
There is no generic way of doing this as far as I'm aware, but this works for a specific ability:
  • Events
    • Game - Button for ability Shockwave and order Orc Tauren Chieftain - Shockwave pressed.
This Event runs when you click the Ability button or press it's hotkey. It's very useful!
 
Last edited:
Level 8
Joined
Feb 17, 2018
Messages
114
What if you used some no target ability (like fan of knvies for example) since it requires no traget and is used when clicked, then trigger if unit casts this spell it will remove te unit or am I missing something?
 
Level 13
Joined
Feb 5, 2018
Messages
567
  • Yay
    • Events
      • Game - Button for ability Shockwave and order Orc Tauren Chieftain - Shockwave pressed.
    • Conditions
    • Actions
      • Custom script: local integer i = GetUnitTypeId(GetTriggerUnit())
      • Custom script: local integer ii = GetUnitUserData(GetTriggerUnit())
      • Custom script: local player p = GetTriggerPlayer()
      • Custom script: local integer iii = GetPlayerId(p)
Try some of these. :D

EDIT: It just actually refers to triggering unit, so no need to do anything fancy.

  • Yay
    • Events
      • Game - Button for ability Shockwave and order Orc Tauren Chieftain - Shockwave pressed.
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (Name of (Owner of (Triggering unit)))
      • Game - Display to (All players) the text: (Name of (Triggering unit))
 
Last edited:
Status
Not open for further replies.
Top