• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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