| 02-17-2004, 09:11 PM | #1 |
I need to set a variable to a mirror image of unknown until I cast it. Target unit of issued order's Mirror image. I want to create the image and then be able to mess with the images life. If anyone can help with this I would be appreciative. |
| 02-17-2004, 09:55 PM | #2 |
bleh its not target as a illusion its just a unit...so make a variable like ver other unit but make it "last summoned unit" or something . |
| 02-18-2004, 06:26 AM | #3 |
I'm late, and this is my last reply for the night, so I'm going to be lazy and not look up teh exact triggers, but here ya go: Events: - A unit finishes casting an ability Condition: - Ability being cast Equals Mirror image Event: - Set _point = Position of (Casting unit) Then do a unit group to pick every unit in a region that's like 500x500 centered around the _point variable. - - If (Conditions) Then (Actions): - - - Conditions: - - - - Unit-type of (Picked unit) is Unit-type of (Casting Unit) [this might work] - - - - [boolean comparison] Picked unit is an illusion - - - Actions: - - - - Do your stuff, yo! So umm.. yeah.. something like that. Make the region as small as possible, to avoid any other hallucinations from the same unit-type being caught in the trigger. |
| 02-18-2004, 07:04 AM | #4 |
You can get the mirror image with the "Unit spawns a summoned unit event" Event - Unit spawns a summoned unit. Condition - Unit type of summoned unit equal to unit type of summoning unit Um wands of illusion might cause slight problems. |
| 02-18-2004, 08:29 AM | #5 |
Ok, I'm creating an illusion of some OTHER hero. Since I can't be sure of the hero I will be cloning I have to somehow get the Image that is created to a variable. Unit Spawn a Summoned Unit doesn't seem to work, and unit starts the effect of an ability doesn't seem to work either. I treid waiting .25 of a second and getting last created unit but that didn't work either. You see, I want to link the 2 units % of HP with triggers. The spell is called Voodoo Doll. I know how to do the linking, I just need to find some way to refer to the Illusion that has been created. I AM using wand of illusion to accomplish the Illusion part of it. Would it be easier using another base spell? Perhaps someone can think of an easier way to create the Image? It definately would be easier if you could simply summon a mirror image of another hero. Then just refer to the last summoned unit. ;) |
| 02-18-2004, 09:36 AM | #6 |
Well thats odd because "Unit spawns a summoned unit" works just fine for me using the wand of illusion item, "Summoned Unit" definitely refers to the illusion, I know this because I have a map where I made the illusions come out at half size (mini-me's). |
| 02-18-2004, 02:25 PM | #7 |
When somebody uses the spell, use a trigger to create the unit (instead of having the wand do it), and then apply an expiration timer to it. That's the best I can think of without really seeing/knowing what you're trying to do. |
| 02-18-2004, 02:49 PM | #8 |
First of all, there is no such thing as a last summoned unit call second, use this trigger Events: A unit spawns a summoned unit conditions: (summoned unit) is an illusion equal to true Actions: Set ilusions[Player number of (summoning unit)] = triggering unit |
