• 🏆 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!

Illusion-based ability

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
I think I had already opened this topic before and no accurate solution is found.
So, maybe our professionals here have gained much more knowledge and new technology/tricks (maybe?) have been discovered to tackle this one problem

How to register the unit that is produced by Illusion-based ability ?
Let's say a Mirror Image spell which summons 3 Illusions upon cast.
How do I get/catch/register those 3 newly-spawned illusion to be saved in a Variable ?

Many people suggested to catch them via picking all units within cast-point location and detect them via IsIllusion checking condition, but this one can't be used as other Illusion-related spells could exist in that game, and potentially clash with the Spell itself - for example, I want to register only those illusions that are summoned from the Spell, and if I picked them all inside the range, it includes other illusions (spawns from other Spell(s) as well), making the spell collides with others.

The easiest visualization for the example above is Phantom Lancer from DotA2, Doppelganger - where it picks all illusions, regardless of the source of the illusions spawned.

Anyone manage to find the solution to this problem yet ?
Or at least a different approach.

Or is it just impossible ? :'(
 
Level 25
Joined
May 11, 2007
Messages
4,651
Does the Mirror image units have the mirror image buff?
Then you could save the hero, do a "get all units near tempPoint1" matching:
Unit != our hero
unit type of picked unit == unit type of (our hero)
unit belong to player(our hero)
unit has buff (mirror image)

It should work since other illusions will not be made with the Mirror image buff and it will be MUI as you do check the player owner of the illusion.
 
Status
Not open for further replies.
Top