Moving an illusion instantly

CungPowCow

Cool Member
Reaction score
6
Hi, my ability I am trying to create essentially damages a target unit & creates an illusion of the caster (not the target). Basicly it's a nuke + Mirror image. But I also want the created illusion to be instantly moved next to the target of the nuke. Everything is in check with my trigger except for moving the illusion. How could I do this? Thanks. (I'm still a bit of a newbie.)

Trigger:
  • Events
    • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Image Blow
    • Actions
      • Unit - Add Image Blow Illusion to (Triggering unit)
      • Unit - Set level of Image Blow Illusion for (Triggering unit) to (Level of Image Blow for (Triggering unit))
      • Unit - Order (Triggering unit) to Orc Blademaster - Mirror Image
      • Unit - Remove Image Blow Illusion from (Triggering unit)
      • Unit - Move (Last created illusion) instantly to (Target point of ability being cast), facing Default building facing degrees


The only problem is there is no "Last created illusion" function. Anyways, thanks for any help again. :)
 

Vnbear

Active Member
Reaction score
12
This method only works if only one unit can cast this spell...

You need to set a point variable for Target point of ability being cast
and
Turn on another trigger

That trigger should be:
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is an illusion) Equal to True
      • (Unit-type of (Triggering unit)) Equal to (Your unit)
    • Actions
      • Unit - Move (Triggering unit) instantly to (point variable)
      • Trigger - Turn off (This trigger)
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
you need 2 more variables, ImageBlowCaster and ImageBlowTarget, both are unit variable

and your first trigger should be like this:
Trigger:
  • Actions
    • Set ImageBlowCaster = (Triggering unit)
    • Set ImageBlowTarget = (Target unit of ability being cast)
    • Unit - Add Image Blow Illusion to ImageBlowCaster
    • Unit - Set level of Image Blow Illusion for ImageBlowCaster to (Level of Image Blow for ImageBlowCaster)
    • Unit - Order ImageBlowCaster to Orc Blademaster - Mirror Image
    • Wait 0.1 seconds
    • Unit - Remove Image Blow Illusion from ImageBlowCaster

you should increase the wait if the hero's cast is not fast enough

also you need one more trigger like this:
Trigger:
  • ImageBlowMove
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • ((Summoned unit) is an illusion) Equal to True
      • (Summoning unit) Equal to ImageBlowCaster
    • Actions
      • Set TempLoc = (Position of ImageBlowTarget)
      • Unit - Move (Summoned unit) instantly to TempLoc
      • Custom script: call RemoveLocation( udg_TempLoc )


--- exlain:
  • basically, when the hero cast Image Blow on a target, the hero and the target are stored in 2 variables ImageBlowCaster and ImageBlowTarget
  • then the hero get a Mirror Image ability and cast it (according to your trigger)
  • when an illusion of the hero is spawned, it will be moved instantly to the position of the ImageBlowTarget
  • a Custom Script is used to remove leak.

edit: TempLoc is a point variable
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top