• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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 63
Joined
Jan 18, 2005
Messages
27,191
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