• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[Trigger] Making illusions

Status
Not open for further replies.
Level 4
Joined
Dec 10, 2008
Messages
59
Hello hive.

Once again, here's another question from Dota: (i know, i know, i'm a dotard)

How do you, via a % chance, spawn illusion(s) of a unit everytime said unit attacks?

Basically, what came to my mind when I first thought of it was an item ability called Wand of Illusion.

So I did the usual GUI (non-MUI) setup, unit attacks, attacking unit is a certain unit, has skill, so on and so forth until i reach the part where I'll give a dummy unit that Wand of Illusion custom ability.

Now the problem is, I can't find a trigger commands that commands a unit to cast that Wand of Illusion on my initial attacking character.

I somehow have this feeling the answer is simple, but yet, I can't think of anything. So I do hope someone can help me out here.

Thanks in advance.
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Here is full trigger:

  • Triger
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of <Ability> for (Triggering unit)) Greater than 0
      • -------- Add more conditions if you want to --------
    • Actions
      • Set TempPoint = (Position of (Attacking unit))
      • Unit - Create 1 <Dummy> for (Owner of (Attacking unit)) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Hero - Create <Wand of Illusion> and give it to (Last created unit)
      • Hero - Order (Last created unit) to use (Last created item) on (Attacking unit)
Trigger above works fine for me.
 
Level 4
Joined
Dec 10, 2008
Messages
59
Here is full trigger:

  • Triger
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of <Ability> for (Triggering unit)) Greater than 0
      • -------- Add more conditions if you want to --------
    • Actions
      • Set TempPoint = (Position of (Attacking unit))
      • Unit - Create 1 <Dummy> for (Owner of (Attacking unit)) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Hero - Create <Wand of Illusion> and give it to (Last created unit)
      • Hero - Order (Last created unit) to use (Last created item) on (Attacking unit)
Trigger above works fine for me.

ARGH, ITEM!!!!

No wonder >___>

Thanks, and +rep!
 
Level 4
Joined
Jun 4, 2009
Messages
70
Here is full trigger:

  • Triger
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of <Ability> for (Triggering unit)) Greater than 0
      • -------- Add more conditions if you want to --------
    • Actions
      • Set TempPoint = (Position of (Attacking unit))
      • Unit - Create 1 <Dummy> for (Owner of (Attacking unit)) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Hero - Create <Wand of Illusion> and give it to (Last created unit)
      • Hero - Order (Last created unit) to use (Last created item) on (Attacking unit)
Trigger above works fine for me.

Ey, smart, i just made it create item for maybe "casting unit", but, how can i give it a chance on hit?
 
Status
Not open for further replies.
Top