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

Status
Not open for further replies.
Level 3
Joined
Apr 1, 2007
Messages
35
How would I make a spell such as this:

unit has a % to dodge an attack and create 1 Illusion of itself that lasts % seconds.

Is it even possible?
 
Level 8
Joined
Mar 23, 2007
Messages
302
shall this be an aura or not , cuz u said UNIT.

For an aura i would say you do a dummy ability (any aura)
and a dummy unit with the ability to cast illusion on targets (unit should be
invisible) and then the rest in GUI so kinda, whenever a unit is attacked ,
check for this aura , check for its level check for its chance and IF all is true
then Unit dodge and create Unit (invisible) (dummy unit) that casts the
illusion ability on the attacked unit.

would say this should work sofar , hope it helped
 
Level 12
Joined
Aug 3, 2005
Messages
745
It can be done, if you substitute>

A unit takes damage
with:
A unit is attacked

All you need to do then is simply.
Event - A unit is attacked
Condition - Unit has Buff (the aura buff)
Actions - Do your stuff

You may need an attack damage detection system thou.
 
Level 3
Joined
Apr 1, 2007
Messages
35
So It needs to be done in triggers? And something like this;
Unit-unit takes damage
Condition-Unit has buff(whatever aura)
Actions-???

What type of category would the action be listed in? Hero, unit, what? I'll look but if anyone can help me with it, I'll be grateful. The unit doesnt need to make a image every time it takes damage.
 
Level 11
Joined
Oct 13, 2005
Messages
233
The only sane way to do this would be in JASS. Also, for the unit takes damage event, that refers to a single unit only, not to any unit. In GUI, this is harder to do than in JASS, especially if you want to avoid leaks. When a unit takes damage, you'd have to detect the amount of damage and add that amount to the unit's life. There would, however, be problems with this as what if the damage was more then the unit's hp?

I believe there is an item ability that does exactly what Mirror Image does. Your other option for replicating this effect is when the unit is attacked, create a dummy unit that will cast Mirror Image, and then Invisible on the hero. The hero shouldn't take damage, but if he does you could also try making the hero temporarily invulnerable.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
it's Item Illusions, wyrm. However, it doesnt have an orderstring. (or an OrderId, far as I remember)

There are 2 easy workarounds to it:

First: make a dummy with an inventory, add an Item with your dummy 'item illusions' ability, and order the dummy to use that item on your hero.
Cons: requires a dummy item

Second: make a dummy with an Orb of Lightning effect, that attacks the hero you want to clone. The Orb of Lightning abil has a 100% chance to fire the Item Illusions ability.
Cons: requires a dummy with an attack, an extra dummy ability, can be evaded
 
Level 8
Joined
Mar 23, 2007
Messages
302
its mb right that you cannot do an evasion-damage-detection in GUI
but you could after all conditions happend :
HERO has AURA
then if the Random real is higher than an amount he will be real dublucated and
the last one who taked the dmg will be removed in addition a dummy unit will be
created to cast item illusion on the new hero, but then you would need to save
the hitpoints befor attacked .... and i dno if this is possible else then every 0.1 sec
in game to save the hp stats but on the other hand this would kill preformance as far
as i know
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Simply every 1-5 seconds pick all units around the hero and create your damage detection trigger after using handle vars(or other systems) to remove the old trigger. When the unit is damaged, run your damage removal actions and then get a dummy to cast illusion on it. Ofcourse this needs jass but thats hardly an issue, the issue is to make an aura system that is non recource-intencive and bug free.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Thats not what he is after. He wants to make an aura that gived units around the hero a %chance to evade and if they evade, a illusion is made. For that he needs to be able to retreive the exact damage delt to a unit, that buff detections and stuff can not do.
 
Level 12
Joined
Aug 3, 2005
Messages
745
I can make you the spell if you wish (in jass), however:
2 things youd have to sacrifice>>

- A unit is damaged changed to >> a Unit is attacked (or hit, wont trigger if he evades an attack)
- Cant have any orb effects, as I need to use Orbs for the attack detection system.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
He wants it so that the aura adds a chance for units nearby to evade an attack thus the unit has to be damaged so the evade can be simulated (you have to read the damage to the units hp)

I say all that is needs is if units take any damage there is a X% chance they would evade that damage spell or not and create and illusion since it really is not worth the effort to do anything more complex. I think vexorian made such a system for his caster system that enabled the detection of an attack AND damage the attack did, maybe try checking some of his work since I think his stackable orb system did that.
 
Level 7
Joined
Dec 26, 2006
Messages
303
Looks simple but I guess it will be many try coz hundred of bug...

Unit takes damage, damaged units have (buff), create 1 (dummy unit) for (owner of damaged unit) at position of (damaged unit), (x) equal to random integer between 1 to 10, (x) equal to 1 than issue (last created unit) to (item-illusion wand) to (damaged unit)

I don't really understand how to write these all correctly and this function only for 10%...

The bold text are the chapter that I really blank for it, just tried to help :emote_razz:
 
Level 14
Joined
Nov 25, 2004
Messages
1,185
This is exactly that cannot be done in GUI...

Code:
Trigger 1
  Events
    Unit enters (Playable map area)
  Conditions
    -
  Actions
    Add event - (Entering unit) takes damage to Trigger 3


Trigger 2
  Events
    Map initialization
  Conditions
    -
  Actions
     Pick every unit in (Playable map area) and do action:
       Add event - (Picked unit) takes damage to Trigger 3


Trigger 3
  Events
    -
  Conditions
    -
  Actions
    Game - Message "LOL I TOOK DAMAGE"
ftw?
 
Level 3
Joined
Apr 1, 2007
Messages
35
I can make you the spell if you wish (in jass), however:
2 things youd have to sacrifice>>

- A unit is damaged changed to >> a Unit is attacked (or hit, wont trigger if he evades an attack)
- Cant have any orb effects, as I need to use Orbs for the attack detection system.

I'd really appreciate if you would write this for me in JASS, because I am not very good at JASS and usually use GUI for almost all of my maps.
 
Level 7
Joined
Dec 26, 2006
Messages
303
No one playing can see that leak, that's very small minor minimized leak... Are you sure someone that want to play a game will seek a leak like we that edit maps?? I don't think so
 
Level 7
Joined
Dec 26, 2006
Messages
303
Dr Super Good, is it make sense why in dotA they make it only 18% for 1 heroes?? I guess this skills just like having many number of Azwraith, except you only put 2% on level one and 1% increased for next level. Not that many unit will copied...

Making multiple shadow in aura was good but too good, even you can defeat the final boss with 1 heroes and 11 footman...
 
Level 11
Joined
Jul 12, 2005
Messages
764
PurplePoot! The only problem with the AnyUnitDamaged system is that it detects EVERY type of damage, including magic/spell.
The best way to detect attack-hits can be done in jass:

1. When the unit (that has the ability) is attacked
-you check for a chance first
-then create an EVENT_UNIT_DAMAGED trigger for the hero (Attacked unit)
-attach the attacker (!) on the hero with HandleVars
-wait 1,5-2 seconds and destroy the damage trigger

2. In the damage trigger:
-use the condition:
EventUnitDamageSource() == GetHandleUnit(GetTriggerUnit(), "Attacker")
-restore the damaged unit's life
-create the illusion
-...
-destroy this trigger

It's not THAT hard if you know jass and how to use HandleVars...
 
Level 13
Joined
Aug 31, 2005
Messages
823
Or, a Gui Alternative...

Event: A unit is attacked
Condintions: Attacked Units health = Max health of (Attacked Unit)
Attacked Unit has buff (Evasion) equal to True
Actions:
Set Variable A equal to Attacked Unit
Unit - Create 1 (Illusion Caster) at unit (position of (Attacked Unit))
Set Variable x equal to Last Created Unit
Unit - order (x) to cast Illusion on unit (a)
Unit - remove (x)

Basically this says a unit is attacked but takes 0 damage (from evasion) then create one unit to cast evasion on the triggering unit.
 
Level 3
Joined
Apr 1, 2007
Messages
35
Or, a Gui Alternative...

Event: A unit is attacked
Condintions: Attacked Units health = Max health of (Attacked Unit)
Attacked Unit has buff (Evasion) equal to True
Actions:
Set Variable A equal to Attacked Unit
Unit - Create 1 (Illusion Caster) at unit (position of (Attacked Unit))
Set Variable x equal to Last Created Unit
Unit - order (x) to cast Illusion on unit (a)
Unit - remove (x)

Basically this says a unit is attacked but takes 0 damage (from evasion) then create one unit to cast evasion on the triggering unit.

How do you make a variable? I know that you can make one, but how do you make it into anything?
 
Level 13
Joined
Aug 31, 2005
Messages
823
First you create the variable, set the type to unit. Then in the trigger above it says set x equal to last created unit. Thats a function in gui. I think its near the top somewhere.
Note: Im pretty sure that wont be multi-instance though so if you want multiple units to be able to cast the spell at the same time then you should set up a "For integer A equals 1 to 12" statement and then set up conditions accordingly.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
I know, pask, I was pointing out a damage detector method. Someone else (can't remember who) already said how to check if it was an attack, far as I remember.

Anyways, I'll restate it --

Add a dummy Slow Psn with 0 damage/0.05 duration/etc in a disabled spellbook to every unit. Now, when the unit takes damage, if it has that buff, it was attacked.

This has a side-effect of disabling orbs, but since you can make cooler on-attack orbs with this, it doesn't really matter ;D

And Cool, if 20 units attack 20 times each, that leak will already become fairly nasty.
 
Level 11
Joined
Jul 12, 2005
Messages
764
Or, a Gui Alternative...

Event: A unit is attacked
Condintions: Attacked Units health = Max health of (Attacked Unit)
Attacked Unit has buff (Evasion) equal to True
Actions:
Set Variable A equal to Attacked Unit
Unit - Create 1 (Illusion Caster) at unit (position of (Attacked Unit))
Set Variable x equal to Last Created Unit
Unit - order (x) to cast Illusion on unit (a)
Unit - remove (x)

Basically this says a unit is attacked but takes 0 damage (from evasion) then create one unit to cast evasion on the triggering unit.
This makes no sence at all... This only triggers when the hero has full HP. Also, you cannot get the damage value, so you cannot restore its life.
I'm gonna write that jass trigger.
 
Level 3
Joined
Apr 1, 2007
Messages
35
Im gonna try Herio-san method and see if it works. This is only going to have 1 level since its an ultamite ability. Will tell results soon.
 
Status
Not open for further replies.
Top