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

[Spell] Make Mirror Image/Illusions green instead of blue

Status
Not open for further replies.
Level 2
Joined
Sep 16, 2014
Messages
17
For allies/owner NO,for enemies use Animation-Vertex Color(hope i spelled it right).But you can make illusion "Neutral-Victim"(so that its not players ally),and make a custom illusion AI trigger(don't know how,but for example,make that when the illusion is clicked,another,dummy unit ( a 100% transparent unit with no shadow), is selected for clicking player,and when the dummy is ordered something make the illusion copy the orders),its not a perfect idea,but can fill in.
Idea NO2: Make a identical copy of the hero/unit,and add it illusion tag from triggers,this idea isn't too good either but,depending on how you want illusions to work,it might do the job.
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
I think you can detect when illusions are created.
Now this thing is a bit more complicated, as you need to understand and use GetLocalPlayer() function.
Basically - you detect and get all those illusion when they're created, then you save into variable the owner of those illusions. Next you iterate through each player and via GetLocalPlayer() check if that player is enemy of the caster. If not, you use the action "Animation - Change unit vertex coloring" on each illusion and set their colors to green.
(Or correct me here if I'm wrong - I assume that both the owner and his allies see which units are illusion and which are not)

I think there may be some problems with spells like Frost Nova. Frost nova applies Frozen debuff, which changes color of affected unit to blue. I'm not sure right now if the unit will retain its green color after the frozen debuff ends.
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
If you want it to apply to all illusions, you can do
  • Events
    • Unit - Unit spawns a summoned unit
  • Conditions
    • Summoned unit is an illusion equal to true
  • Actions
    • Animation - set unit vertex colour...
Not a good approach. The idea of illusion's changed color is that only the owner (and possibly his allies) see that, thus they know which units are illusions and which are not. What your trigger does is that it changes color of the unit for each player - even for enemy players and thus negating the purpose of illusions.
 
Status
Not open for further replies.
Top