• 🏆 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!

About mirror image

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,535
I THINK this works, I haven't tested it. Not sure if the conditions check out since I've never worked with illusions before, but I assume Unit-Type works with illusions.

  • illusion swap
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Illusion Swap
      • ((Target unit of ability being cast) is an illusion) Equal to True
      • (Unit-type of (Target unit of ability being cast)) Equal to (Unit-type of (Triggering unit))
      • (Owner of (Target unit of ability being cast)) Equal to (Owner of (Triggering unit))
    • Actions
      • Set tempUnit[0] = (Triggering unit)
      • Set tempUnit[1] = (Target unit of ability being cast)
      • -------- - --------
      • Set tempPoint[0] = (Position of (Target unit of ability being cast))
      • Set tempPoint[1] = (Position of (Triggering unit))
      • -------- - --------
      • Set X = (X of tempPoint[0])
      • Set Y = (Y of tempPoint[0])
      • -------- - --------
      • Custom script: call SetUnitX(udg_tempUnit[0], udg_X)
      • Custom script: call SetUnitY(udg_tempUnit[0], udg_Y)
      • -------- - --------
      • Set X = (X of tempPoint[1])
      • Set Y = (Y of tempPoint[1])
      • -------- - --------
      • Custom script: call SetUnitX(udg_tempUnit[1], udg_X)
      • Custom script: call SetUnitY(udg_tempUnit[1], udg_Y)
      • -------- - --------
      • Custom script: call RemoveLocation (udg_tempPoint[0])
      • Custom script: call RemoveLocation (udg_tempPoint[1])
And since you can't choose Illusions in your abilities Filters then you'll have to cancel the ability with triggers instead.
  • illus cancel
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Illusion Swap
      • Or - Any (Conditions) are true
        • Conditions
          • ((Target unit of ability being cast) is an illusion) Equal to False
          • (Unit-type of (Target unit of ability being cast)) Not equal to (Unit-type of (Triggering unit))
          • (Owner of (Target unit of ability being cast)) Not equal to (Owner of (Triggering unit))
    • Actions
      • Unit - Order (Triggering unit) to Stop
 
Last edited:
Level 7
Joined
May 14, 2019
Messages
255
Have a trigger that stores the unit and the illusion as variables, then when a dummy ability is used it switches the two. It's not complicated
 
Status
Not open for further replies.
Top