• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Solved] Mirror image destroys variables?

Status
Not open for further replies.
Level 5
Joined
Feb 18, 2016
Messages
96
I set a learning hero to turn into Var(variable) when the learned hero´s skill equal to a custom mirror image. Problems is i see that when the mirror image is casted the variable stops working until i level up mirror image skill so i reactivate the set variable =

  • Varia
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Mirror Image
    • Actions
      • Set Varia = (Learning Hero)
 
Well, you set this Variable is only for "Learning Hero"

and

You cast mirror image is different event....

Lean a skill is (Learning Hero)
Start the effect of an ability[<-mean cast spell] is for (Triggering Unit)
 
Thanks for the replies

Well, you set this Variable is only for "Learning Hero"

and

You cast mirror image is different event....

Lean a skill is (Learning Hero)
Start the effect of an ability[<-mean cast spell] is for (Triggering Unit)
If i dont cast the spell the variable works perfectly and if i create another trigger that set the variable again (or a different variable) when it casts the ability it dont create the variable. I use learning hero variable because the ability gives you an active and a passive effect that works pretty well if i dont cast mirror image

As far as I am aware, using mirror image will not change the handle of a unit. As such the variable should still correctly refer to the caster of Mirror Image after mirror image is cast.

Maybe another trigger is conflicting with the variable?

I going to search about a conflict while i trying to solve this error
 
I found the problem but i am unable to solve it because i dont know how. When i modify the mirror image ability or create a new custom skill which based on mirror image the ability starts to delete the variable. I made a blank map and modified its objects until i fond the error and that is.

Any ideas?
 
Last edited:
  • mirror image
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Mirror Image based ability
    • Actions
      • Set hero = (Learning Hero)

  • hero variable trigger
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to hero
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
As you can see the trigger stops working when the mirror image is casted
 

Attachments

As you can see the trigger stops working when the mirror image is casted
That is because every unit created by mirror image learns the ability. So for example, if you have level 3 mirror image in your test map and cast it, then the learn trigger fires 6 times. It fires 3 times for the real hero and 3 times for the illusion. The illusion often ends up learning it last so the variable gets set to them.
 
That is because every unit created by mirror image learns the ability. So for example, if you have level 3 mirror image in your test map and cast it, then the learn trigger fires 6 times. It fires 3 times for the real hero and 3 times for the illusion. The illusion often ends up learning it last so the variable gets set to them.

It is true! Thanks you very much. I was using a trigger that set the variable with different abilities learned on every hero
  • Varia
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Learned Hero Skill) Equal to q
          • (Learned Hero Skill) Equal to w
          • (Learned Hero Skill) Equal to e
          • (Learned Hero Skill) Equal to r
    • Actions
      • Set Hero = (Learning Hero)
and now i disabled this trigger and replaced it by casting unit triggers and they works perfectly without rewriting all the triggers this units starts
 
Status
Not open for further replies.
Back
Top