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

mirror image unit type

Status
Not open for further replies.
Level 2
Joined
Apr 27, 2006
Messages
8
when u use mirror image are the illusions considered last created unit or summoned unit or sumthin else? because i want to add the kaboom ability to the illusions. can any1 make a trigger 4 dis pls tnx
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Last Created Unit is a global variable which automatically stores the value of the last unit created via "Unit - Create Units..." action.

As for the summoned unit, didn't try but it cannot pick all the illusions anyway. However, everytime an unit casts the ability, wait until it finishes casting it (dunno the time, experiment with it) and then just pick every unit within the area of the caster which is illusion andwhose unit type is equal with the one of the caster. Normally that should do it.

~Daelin
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
If im not mistaken GetSummonedUnit() returns the summoned unit if used in the actions of EVENT_PLAYER_UNIT_SUMMON.
That event runs each time it SPAWNS a summoned unit thus with mirror image it will run for each illusion created.

To put it more clearly if a spell spawns 15 units the event will run 1 time for each unit when it is summoned even if they are all summoned instantly at the same time.

Note that the event will only run when an ability spawns a summoned unit NOT when a trigger creates one or a building makes one.
 
Status
Not open for further replies.
Top