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

[Help] Specifying Illusions From Mirror Image

Status
Not open for further replies.
Level 5
Joined
Jul 16, 2009
Messages
80
  • Specifying Illusions From Mirror Image[/b]
  • I have some problems storing Mirror Image illusions as variables.
  • Basically what I wanted to do, is to change the color vertex of those illusions into something different from the hero.
  • [hidden="Skill Description"]The hero creates 2/3/4/5 shadows of himself that deals 30% damage and receives 300% damage.[/hidden]
  • [hidden="Misc. Info"]Of course, as the owner of the hero, I could only (and always) see the illusions as blue-ish in color. So, the recoloring of the illusions can only be viewed by other players (and I meant it that way). (For example, watching replay through another player's vision)[/hidden]
  • Here's the way I've made the trigger [i](simplified version)[/i] in order for it to work:
  • [hidden="Trigger"]
  • [TRIGGER]Recoloring Illusions
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mirror Image
    • Actions
      • Wait 0.01 seconds
      • Set MUI = MUI + 1
      • Set User[MUI] = Triggering Unit
      • Set TempLocation[MUI] = Position of User[MUI]
      • Set TempGroup[MUI] = (Units within 200.00 of TempLocation[MUI] matching ((((Matching unit) is an illusion) Equal to True) and ((Owner of (Matching unit)) Equal to (Owner of User[MUI]))))
      • Unit Group - Pick every unit in TempGroup[MUI] and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit)'s vertex coloring to (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Custom script: call RemoveLocation(udg_TempLocation[MUI])
      • Custom script: call DestroyGroup(udg_TempGroup[MUI])
[/hidden]
I set the animation delay to 0.00 sec, and then I put the "Wait 0.01" so that I could ensure that the trigger selects the illusions AFTER they are created.

The problem is obvious: The existence of "Wait".

How can I make this trigger perfect without using "Wait"?

Can anyone help me please.
 
Last edited:
Level 5
Joined
Jul 16, 2009
Messages
80
Remove Pootis "wait" part. If for some weird reason it does not work - make a timer and change coloring when it expires. But I'm really doubt you need that.

I've actually tried all sorts of events and conditions to make it work, like:
- Unit summons a unit
- Unit enters playable map area
etc..

So far the only workable method is to put a timer.

I've thought about not having the hero skill mixed up with item skills (therefore specifying the skill) or the Mirror Image illusions getting mixed up with illusions from Wand of illusion.

This is one hectic + annoying debugging part.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I have attached a test map
It is MUI

@Thread Starter
Can you even color your own / allied illusion units into another color different than blue ?
I believe this mechanics is hard-coded, you can't even manipulate the data (I think..)
 

Attachments

  • Simple Illusion Picking System.w3x
    13.6 KB · Views: 72
Level 5
Joined
Jul 16, 2009
Messages
80
I have attached a test map
It is MUI
Thanks a heaps! But there's a problem. Explained in the example scenario below.

@Thread Starter
Can you even color your own / allied illusion units into another color different than blue ?
I believe this mechanics is hard-coded, you can't even manipulate the data (I think..)
As the owner/allies of the illusions, of course we can't see them as anything other than blue.

First you can't make this with a simple Start the effect event. You have to trigger the illusions as a spawned unit. For the recolor you have to use GetLocalPlayer.
I'm aware of that issue as well.

Let me give a simple scenario:
- Blademaster use Wand of Illusion on himself, so he has illusions next to him.
- Then he casts Mirror Image.

If I were to specify illusions in range, that includes the former illusions as well.

Here's what I think would work:
  • Trigger 1
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being casted) equal to Mirror Image
    • Actions
      • Set MUI = MUI + 1
      • Set User[MUI] = Triggering unit
      • Set SkillLevel[MUI] = Level of Mirror Image for User[MUI]
      • Set Boolean[Custom value of User[MUI]] = True
  • Trigger 2
    • Events
      • Unit - A unit spawns a summoned unit
    • Conditions
      • Summoned unit is an illusion
      • Unit-type of summoned unit equal to unit-type of Blademaster
    • Actions
      • Set TempGroup[1] = Units in Playable map area matching condtion (unit-type of matching unit equal to Blademaster) and (Matching unit is an illusion not equal to True)
      • Unit group - Pick all units in TempGroup[1] and do action
        • Loop - Actions
          • If - Condition
            • Boolean[Custom value of (Picked Unit)] equal to True
          • Then - Actions
            • Set TempLocation = Unit - Position of (Picked unit)
            • Set TempGroup[2] = (SkillLevel[MUI]) units within 300 range of (TempLocation) matching condtion (unit-type of matching unit equal to Blademaster) and (Matching unit is an illusion equal to True) and (Owner of Matching unit equal to Owner of Picked unit)
            • Unit group - Pick all units in TempGroup[2] and Animation - Change (Picked unit)'s vertex coloring to (0.00%, 0.00%, 0.00%) with 0.00% transparency
            • Custom script: call DestroyGroup(udg_TempGroup[2])
            • Custom script: call RemoveLocation(udg_TempLocation)
          • Else - Actions
      • Custom script: call DestroyGroup(udg_TempGroup[1])
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Can you rephrase on what you really want ?
I can't decipher it very well...

All I understand is:
1. You want your OWN/ALLIED illusions to look different than blue (color data can be manipulated by Animation Action but we can only see... BLUE)

OR

2. You want your ENEMY to see different color (different than blue)

Or what is it that you really want ?
 
Status
Not open for further replies.
Top