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

[Spell] AoE wand of illusion and health sharing?

Status
Not open for further replies.
Level 3
Joined
Nov 15, 2012
Messages
32
how are you guys, lurker here
I have 2 things to asked as you can see at the title:

#1 AoE Wand of Illusion
Not exactly the same as the title... so I happen to use dummy a lot to make customize spell. Let's say I'm using Silence spell as base, later I'll pick every unit within 750 of point of ability being cast and create dummy to cast Wand of Illusion for each (seems like Terrorblade's 1st skill on DotA huh?)

The problem is I don't know how to command dummy to cast Wand of Illusion, it works just fine if I use Storm Bolt instead. Can someone tell me how to command them?
I've tried giving the dummy inventory and it still won't use the item on slot 1

#2 Health Sharing
Continuation with the #1
The illusion resulted from Wand of Illusion takes 0% damage which makes them almost invulnerable, however this illusion share damage with its origin. Let's say 3 units (A-1, B-1 and C-1) has been hit with AoE Wand of Illusion, resulting 3 illusion (A-2, B-2 and C-2).

Whenever A-1 takes damage so does A-2, B-1 takes damage so does B-2, etc.
I can do this one just fine if there's only few units which shares health but I don't know what to do if there's like 7+ more units that shares health.
Will using array solve this?

=================================================
thanks for your attention

please note that I prefer GUI over JASS and want to avoid customscript as much as possible
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
#1
  • Set Caster = (Triggering unit)
  • Set Target = (Picked unit)
  • Custom script: call IssueTargetOrderById(udg_Caster, 852274, udg_Target)
The (Picked unit) should be inside Unit Group action, I just showed you basics.

By right, the dummy unit should have Wand of Illusion ability first.
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
2. i think you could add a buff to all the units (the illusions and the real one) and when a unit (let's call it A) that has the buff takes damage, pick every unit that has the buff and not equal to A and deal damages equal to the damage that is done to A.
 
Level 10
Joined
Jun 6, 2007
Messages
392
2. Make a unit array A. You will need a unit indexer or a hashtable, I'll use indexer in my example. When a unit is targeted by the illusion spell, add it to unit group G and set A[custom value of target unit] = created illusion. Use Gui Damage Engine to detect when a unit takes damage, and check if that unit belongs to a unit group. Then simply damage A[damaged unit] by amount of damage dealt.
 
Level 3
Joined
Nov 15, 2012
Messages
32
#1
  • Set Caster = (Triggering unit)
  • Set Target = (Picked unit)
  • Custom script: call IssueTargetOrderById(udg_Caster, 852274, udg_Target)
The (Picked unit) should be inside Unit Group action, I just showed you basics.

By right, the dummy unit should have Wand of Illusion ability first.
CMIIW so Wand of Illusion ability can only be issued using custom script?

2. i think you could add a buff to all the units (the illusions and the real one) and when a unit (let's call it A) that has the buff takes damage, pick every unit that has the buff and not equal to A and deal damages equal to the damage that is done to A.
doesn't work, when I tried to do as you said when A-1 takes damage it shares with A-2, B-2 and C-2

2. Make a unit array A. You will need a unit indexer or a hashtable, I'll use indexer in my example. When a unit is targeted by the illusion spell, add it to unit group G and set A[custom value of target unit] = created illusion. Use Gui Damage Engine to detect when a unit takes damage, and check if that unit belongs to a unit group. Then simply damage A[damaged unit] by amount of damage dealt.
this mean I have to put A-1/2, B-1/2 and C-1/2 in different array right?
then instead of creating all the illusion in the same time do I have to create it with a loop trigger so I can put each of them in different array?

can someone give me a example trigger/map since this one is really confusing me
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
CMIIW so Wand of Illusion ability can only be issued using custom script?
Apparently, its order does not included in GUI.
It can be only issued via Item Order in GUI, but you can't actually find its Ability Order via GUI, you have to follow that custom script, it's easy I believe.
By doing this, you don't need to create Item and give it to dummy, you just give the actual Wand of Illusion ability to the dummy and order it to cast via that script.
 
Level 3
Joined
Nov 15, 2012
Messages
32
Apparently, its order does not included in GUI.
It can be only issued via Item Order in GUI, but you can't actually find its Ability Order via GUI, you have to follow that custom script, it's easy I believe.
By doing this, you don't need to create Item and give it to dummy, you just give the actual Wand of Illusion ability to the dummy and order it to cast via that script.
well if there's no other way to order it except using custom script them I'd have no choice but to use it right?
thanks for your help, now I just have to think how to share health between each illusion and origin

good luck to your health sharing between blademaster and its illusion since it seems will help me with my health sharing too
 
Status
Not open for further replies.
Top