• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 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