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

[Trigger] Problem with Mirror Image skill removal

Status
Not open for further replies.
Level 5
Joined
Jul 16, 2009
Messages
80
I'm making this skill which basically:

- User targets an enemy unit
- User moves to the location of the target
- Trigger gives Mirror Image skill to user (set it to non-hero ability)
- Order user to Mirror Image
- Second trigger removes Mirror Image after cast

Problem:
- Illusions are removed when Mirror Image is removed via trigger.
- I want the illusions to last as long as its expiration timer.


Here's the skill removal trigger:
  • Mirror Image Skill Removal
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • ((Summoned unit) is an illusion) Equal to True
      • (Unit-type of (Summoned unit)) Equal to (Unit-type of (Summoning unit))
      • (Owner of (Summoned unit)) Equal to (Owner of (Summoning unit))
      • (Level of Mirror Image for (Summoning unit)) Greater than or equal to 1
    • Actions
      • Unit - Remove Mirror Image from (Summoning unit)


I've thought of some ideas to solve it, but they are not perfect solutions:
- Give the hero a charged item to use and cast Mirror Image (Problem: hero may not have a free item slot)
- Create a dummy hero, set its items and stats to match original hero, order it to cast Mirror Image (Problem: the final game statistics will show that the triggering player uses two or more heroes)
- Create a dummy and give it wand of illusion to use it on the hero (Problem: the hero had its collision turned off, then move to target location, overlapping with the target, then cast Mirror Image so that the illusions will surround the target. Wand of illusion could not pinpoint illusion spawn location)

Anyone has any idea how to help me? Feel free to ask me questions regarding the mechanics of the spell.

Heaps of appreciation from me. =D
 
Last edited:
Level 26
Joined
Aug 18, 2009
Messages
4,097
- Give the hero a charged item to use and cast Mirror Image (Problem: hero may not have a free item slot)

There is the 'Item: Illusions' ability (AIil) which is a target spell and can be cast by any unit.

You may also try to not remove the ability from the hero but just disable the ability for its owner after casting --> SetPlayerAbilityAvailable. This would hide the button and the hero cannot start another cast until you enable 'Mirror Image' again.
 
Level 5
Joined
Jul 16, 2009
Messages
80
You may also try to not remove the ability from the hero but just disable the ability for its owner after casting --> SetPlayerAbilityAvailable. This would hide the button and the hero cannot start another cast until you enable 'Mirror Image' again.

That's a way to do it, but it will limit the spell from MUI to MPI. Hehehe. Good tips there, but it lacks the MUI capability. =(
 
Level 5
Joined
Jul 16, 2009
Messages
80
Nope, you shall enable the ability, order it and disable it right again, which should not touch the other instances if it did not even for the single.

Smart!! Thanks!! I didn't even thought of that!! =D I'll test it out.

...add a Wait trigger set to the time of the cooldown...

You have much to learn about the Wait trigger, I suppose? =)
 
Level 5
Joined
Jul 16, 2009
Messages
80
Send me the map and i'll show you, useless now tho since my method was less effective than the one above...

It doesn't matter. Because as far as I know, the Wait function messes up the MUI system. I won't explain about the function in this thread (you can find it in other threads), but here's my reply to you regarding what I want for the skill mechanics/system in terms of event sequence:

- Hero casts Skill_A at an enemy.
- (trigger) Turn off collision for hero.
- (trigger) Move hero to enemy location.
- By this, the location of hero = location of enemy.
- (trigger) Add Mirror Image to hero.
- (trigger) Order hero to cast Mirror Image.
- Due to the mechanics of Mirror Image, the animation will look like multiple clones of the hero coming out from the body of the enemy.
- (trigger: my method) Event: Unit spawns a summoned unit; Action: Turn on collision for hero. Remove Mirror Image from summoning unit. Not working because doing this will remove the illusions as well.
- (trigger: proposed by WaterKnight) Disable the ability Mirror Image, only to enable it prior to the next cast.

I'm not at home at the moment, so I cannot give a confirmation on whether WaterKnight's proposal works or not. I'll edit this when the testing is done.

Edit: WaterKnight's proposal works. Problem solved.
 
Last edited:
Status
Not open for further replies.
Top