HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Mirror Images and Upgrade problem

04-30-2007, 06:41 PM#1
PsychoPif
I have a hero that uses upgrade for one of his ability. He also has a mirror image ability. The problem is, Each time I use the mirror image, it look like all image, including the hero, relearn all the abilities. Since I'm setting the upgrade at ability learning, it upgrade once per image. Here's how i do the upgrade.
Trigger:
Shadows Reach
Collapse Events
Unit - A unit Learns a skill
Collapse Conditions
((Learning Hero) is Summoned) Equal to False
(Learned Hero Skill) Equal to Shadow's Reach (Daughter of Shadow)
Collapse Actions
Player - Set the current research level of Upgrade Moon Glaive to ((Current research level of Upgrade Moon Glaive for (Owner of (Learning Hero))) + 1) for (Owner of (Learning Hero))
I tried adding the summoned check to make sure it does'nt happen when the image are created, but it look as if they are not classed as summoned.

Is there anyway I can diferenciate between a real learning and the image one? Is there any other way to create some form of miror image ? I guess the last option would be much more complicated, I'd be happy to be fowarded to a tutorial or an example.

Thanks.
04-30-2007, 07:03 PM#2
Castlemaster
Well, I would guess that mirror image resets certain variables, such as the level of your upgrade. I beleive that you are saying that when the hero uses mirror image, his upgrades that have been set by a trigger, are lost or changed to their original level (your English is a bit off. The word is classified not classed, and its images are created not image are created. :) )

One simple way can be to use this trigger
Trigger:
Mirror Image Debug
Collapse Events
Unit - A unit Finishes casting an ability
Collapse Conditions
(Ability being cast) Equal to Mirror Image
Collapse Actions
Player - Set the current research level of Upgrade Moon Glaive to ((Current research level of Upgrade Moon Glaive for (Owner of (Casting Hero)))) for (Owner of (Learning Hero))

You could do this by setting the current research level to a variable after it is learned
Trigger:
Shadows Reach
Collapse Events
Unit - A unit Learns a skill
Collapse Conditions
((Learning Hero) is Summoned) Equal to False
(Learned Hero Skill) Equal to Shadow's Reach (Daughter of Shadow)
Collapse Actions
Player - Set the current research level of Upgrade Moon Glaive to ((Current research level of Upgrade Moon Glaive for (Owner of (Learning Hero))) + 1) for (Owner of (Learning Hero))
Set Variable - Set MoonGlaiveUpgrade = current research level of Upgrade Moon Glaive
04-30-2007, 08:18 PM#3
PsychoPif
Damn I was hoping my poor english would go unnoticed if I used by word ;)
Right now what hapen is that each image spawn trigger my code, so the hero gets free upgrades. So instead of spending skill points, he just need to learn the ability once, then spam the mirror image skill until the upgrade is maxed, which happen pretty fast once he can create multiple copies.

Setting up a variable would work, but what would be the best way to make this work with mulple player having the same hero ? I'd need an array for each upgrade. Look to me like it would become quite a burden in the end. I guess I might have to pay that price, but if there is a way to get a good condition that would prevent the free leveling, I'd be in heaven :)

EDIT: Wow I'm either blind or Blizzard has some strange way to do things. Under Unit - Unit classification check (what I used to check if it was a summon) there is a Unit - Unit is an Illusion Boolean condition. I would have made it part of the unit classification check, but it seems like it deserve it's own function. Of course it made everything work like a charm, no variable at all.

Here's the final Trigger:
Trigger:
Shadows Reach
Collapse Events
Unit - A unit Learns a skill
Collapse Conditions
((Triggering unit) is an illusion) Equal to False
(Learned Hero Skill) Equal to Shadow's Reach (Daughter of Shadow)
Collapse Actions
Player - Set the current research level of Upgrade Moon Glaive to ((Current research level of Upgrade Moon Glaive for (Owner of (Learning Hero))) + 1) for (Owner of (Learning Hero))
05-01-2007, 01:53 AM#4
Castlemaster
Hm, well good for me to know in the future