HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Illusions and Abilities

07-11-2006, 12:52 PM#1
StockBreak
Hi, yesterday I tried to give to an illusion a passive ability, but it didn't work, the illusion didn't have that ability... So I tried to give the passive ability to my hero and have him casting Mirror Image or similar; again the illusions didn't have the ability. Only the heroes passive ability learned before the spell was casted were owned by the illusions; I want my illusions having an ability which is added with triggers to my Mirror Image casting hero. Any suggestion? Thanks.
07-11-2006, 01:16 PM#2
Balthamos
Well, make a trigger that checks for the casting of the Mirror Image ability.

Then have it pick every unit nearby matching the unit-type of the Illusion Unit (and if its own by the owner of the casting unit)
when such a unit meets this criteria then have the passive ability added to the unit.

If it doesn't seem to work, it may be that you need a 'wait - 1 second' in there.

You probably know about the problems associated with waits... if your spell is only related to one player, say in a single player rpg campaign, then it shouldn't be a problem ( i.e the trigger isn't called very often )

If that's a problem then there are workarounds, an array of timers, one for each player.

However it may be that if the trigger COULD be called often but isn't called too often, then you could have a 1 second wait, and change the pick every unit in range, to simply pick every unit (and drop the check for player authenticity)

So that even if the trigger is hijacked by another player, there'll still be only a 1 second wait until the situation is rectified for all Illusion units anyway.

Hope this helps.
07-11-2006, 01:20 PM#3
Rising_Dusk
You could just simulate the entire Mirror Image effect via triggers.
However, having just finished a spell doing just that for the contest, let me tell you it's not as easy as I wish it was.

My other suggestion is to add the ability you want to give to the images "when unit starts casting an ability" -- that will put it on the hero BEFORE the images are actually created.

This creates one issue in that if you cast it then click stop your hero would have a new ability -- you'd have to make sure you could detect that 'stop' via a dynamic trigger and then remove the ability accordingly.
That's probably how I would do it.
07-11-2006, 01:28 PM#4
StockBreak
Well, thank you both, but there are two main problems:
- Can't add abilities to illusions (it is known problem, neither active nor passive)
- The second problem is bigger, in fact, it seems that if you add trough triggers a passive ability to a hero (for example a venomous attack/critical strike) the illusions casted by Mirror Image, won't have that ability, dunno why! It seems that only learned heroes abilities / passive abilities added in the object editor will transfer to mirror images.

Any suggestion? Thanks.

EDIT: I already tried to use UnitMakeAbilityPermanent, but it doesn't work anyway...
07-11-2006, 01:47 PM#5
Rising_Dusk
Quote:
You could just simulate the entire Mirror Image effect via triggers.
If you're sure on all points you stated above, then this is what you're left with.
07-11-2006, 01:58 PM#6
StockBreak
Quote:
Originally Posted by Rising_Dusk
If you're sure on all points you stated above, then this is what you're left with.
Lol, I tried once upon a time... I give up... My last chance is to give the unit the ability from the beginning in the object editor. Anyway isn't it strange?
07-11-2006, 02:04 PM#7
Rising_Dusk
I personally hate images.
They're like blight; screwy, weird, and retarded to work with.

On a side note:
You could always make a unit version of the hero in the object editor and then just create bunches of those when you use mirror image; it'd be more like SEaF, but it's easier. If you want to see some manipulation of real illusions in triggers, then you might consider looking into this spell I made.
07-11-2006, 02:06 PM#8
Panto
I thought that illusions, like Animated dead, are automatically unable to have their abilities as part of the function of the spell.
07-11-2006, 03:14 PM#9
The)TideHunter(
Illusions cant have abilities, end of story, and if they have them, they cant use them.
07-11-2006, 03:41 PM#10
StockBreak
Quote:
Originally Posted by The)TideHunter(
Illusions cant have abilities, end of story, and if they have them, they cant use them.
This is wrong, illusions can have passive abilities such as Critical Strike (on this thread we're talking about passive abilities...); simply they must be learned not through triggers by the caster.
I think that my final solution will be adding those abilities through the Object Editor (they're just passive Buff abilities to detect attacks such as "Slow Poison", they do nothing).
07-11-2006, 07:19 PM#11
The)TideHunter(
Yes i seem to be wrong, bash dosent work, so i persumed the rest of passive dident, which was my mistake.
Non-passive abilities dont work though =).
07-11-2006, 08:37 PM#12
King Klear
Common sence tells me, that the working ones must be those, which would be a giveaway that the unit is an ilusion. I think I've noticed before that mirror images pretend they can do critical strike, etc.