• 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.

Switch with mirror image?

Status
Not open for further replies.
Level 4
Joined
Jul 25, 2005
Messages
48
How would I go about creating a mirror image spells and when the spell is cast the Caster gets an ability to switch places with the mirror image? Or if that is to hard just be able to teleport to the image.
 
Level 10
Joined
Aug 8, 2004
Messages
562
i think you might be able to do that with a trigger that every .01 seconds a (point) variable is set to the position of the caster and the image.
and then you can add the spell to the hero (this is easy) and make a trigger that when the caster starts the spell he is instantly moved to the image's variable and the image is moved to the caster's variable.

if that seems a little too complicated i can make it for you.


~iplaystarcraft
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
That's a problem because you need to track the mirror image. You can pick every unit around the caster which is an illusion and whose unit type is equal with the one of the caster. Then get the mirror unit in a variable and give the caster a dummy unit. Everytime the caster casts the ability you switch positions, getting both positions into variables and moving caster to illusion and illusion to caster.

~Daelin
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
I have thought about this and I came to a conclusion. It is possible to detect the illusion. You would need something like this:

Event - An Unit is Being Summoned
Conditions - (Summoned Unit) is an illusion equal to true
- (Casting Unit) has YourMirror equal to true

And then the mirror image is just the summoned unit. This worked for Water Elemental spell, so it should work for Mirror Image too.

~Daelin
 
Status
Not open for further replies.
Top