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!
It's easy... but depends on how you want the effect... I'll give you an example about how to do it so, when the first shadow strike hits the target, other shadow strikes goes from that target to other arounds in 300 AoE.
This is all in GUI, but I'll show you This way since I don't have the editor here to create the thing and copy-paste.
Things you need:
1- A Point variable (I'll call it "Point")
2- A unit with no model (just type .mdl in import field of Art - Model) no shadow, no collision, Locust ability, Invulnerable ability, 9999 hp, 9999 mana, 522 speed, and 100 (or so) sight range, no attack enabled. Flying movement.
JASS:
Event
A unit starts the effect of an ability
Conditions
Unit Type of (Triggering Unit) is not equal to Dummy
Actions
Set Point = Position of (Target Unit of Ability Being Cast)
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick Every unit in (Units within 400 range from Point Matching (Matching Unit is an Enemy of Triggering Unit = True) and do actions
loop
Unit - Create 1 Dummy at Point for (Triggering Player) facing default degrees.
Unit - Add 'Your*Shadow*Strike*Spell' to (Last Created Unit)
Unit - Order (last created unit) to Undead - Shadow Strike (Picked Unit).
Unit - Add a 0.5 Generic expiration timer to (Last Created Unit)
Custom script: call RemoveLocation(udg_Point)
This is not too accurate though, since the Shadow Strike will be shoot from your target unit to units around before your first shadow strike reaches the target.
If you want to give it more range, just increase the range in the group from 400 o whatever you want (be sure to give the ability the same range though)
If you want the second shadow strike to be weaker, just create that ability, and give that to the dummy.
I suggest you learn more about these things if you are gonna be creating maps or spells...udg_Point is an Ability type variable not a Location. Turn udg_Point into a Location variable and then do:
Set Point = (Target Point of Ability being cast)
Afterwards do:
Unit Group - (Pick every unit in (Units within 400 of Point)) and do (Actions)
Of course you will have to filter what kind of units to pick: enemy, allied, ground, air, neutral, etc...for the spell to work correctly.
Ofc... but if the ability is based on shadow strike, it would be casted when you order a shadow strike... check if the dummy caster has enough mana, can see the target etc...
Also since you named it Acid Bomb, make sure that it isn't the default acid bomb... and make sure that it is a UNIT ability...
and aside from the trigger firing even when you cast a different spell, you also leak locations... Position of Triggering Unit... I think that should have been the Point variable...
also, if that unit is locusted, you better add him to a variable because sometimes, Last Created unit forgets a unit that has locust...
I tried if it leak, but seems like when i do wind walk, mirror image or critical strike (those are the other spells this hero has) it does not do shadow strike.. so it works perfectly then?
because the target point of those abils is null, it will take effect at the center of the map...
Also that is not what a leak is... your usage of Position of Triggering unit causes a memory leak as you don't remove it afterwards... also your placing of the removelocation for Point is wrong... you should place it after the group loop, not inside...
Shadow Strike AoE = Your ability
Dummy Caster = Dummy Caster unit
Also check when adding ability to dummy caster unit that the mana cost 0, make sure dummy caster requires no food, can't be seen on map, is unselectable (to do this give him the Locust ability in the object editor with the invulnerable ability) and disable all of his attacks.
also, no need for the group variable as the custom script set bj_wantblahblah automates the destruction of the group... and you leak the locations too...
also, Triggering Unit is faster than casting unit...
also, no need for the group variable as the custom script set bj_wantblahblah automates the destruction of the group... and you leak the locations too...
Are you sure that the dummy can cast it? like mana cost, range and also that its a unit ability? and what about the shadow strike on the condition? is it the custom shadow strike that your hero has?
The shadow strike in the condition should be the shadow strike that the hero unit casts, while the shadow strike that you add to the dummy should be the shadow strike which will actually do the damage, and make sure that the dummy can cast it...
Add a line before the set point = target point which will show a message to all players saying "Spell run" then, put another game message inside the group loop saying "Loop"
then test the spell again and see which messages are shown
if the Spell Run message doesn't show, it means your condition is wrong... if the message Loop doesn't show then it means that there is no unit picked... you can also add your own debug messages in the other parts of the trigger too, to see which parts work and which parts doesn't...
One more question. Can I make other spells like this ?
I mean example. Entagled Roots or Storm Bolt and do I have to do Dummy unit for all different spell or will the one Dummy unit work on all of them?
Cactuar, you're in the right road. Testing, trying, asking, experimenting. That's the best way to learn Wc3.
As long as you understand the basis of what that trigger does, you can manipulate actions and conditions to do almost whatever you want... Eventually you reach the point where you don't even need to test triggers and skills... You'll know they work. Please, Adiktuz said it, I say it too: USE TRIGGER TAGS You can Right-Click the trigger header (The trigger name, the first line of your trigger) and "Copy as Text".
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.