• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

How to detect which unit i just used my item on?

Status
Not open for further replies.
Level 3
Joined
Aug 24, 2014
Messages
22
Very noobish question, but for example: Whenever I use an item on a unit, a dummy unit appears and casts slow on the targeted unit. But how do I make the dummy unit to cast slow on the targeted unit? Thanks!
 
Level 3
Joined
Aug 24, 2014
Messages
22
Not really what I meant, I just want to know how to make the dummy unit to cast spell on the targeted unit. The slow is only an example :p Sorry for the misunderstanding
 
Level 12
Joined
May 22, 2015
Messages
1,051
I'm not sure if there is an event variable for this. You could try just detecting the "starts the effect of an ability" event and use "target unit of ability being cast". You'd compare the ability instead of the item.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Using item ability can also be captured by using 'A unit starts the effect of an ability' which the ability would be based off of the Item Ability.

Use the 'Ability being cast' to refer to the ability that is cast from the Item.
 
Status
Not open for further replies.
Top