[Solved] Custom AOE root spell bug?

Status
Not open for further replies.
Level 2
Joined
May 25, 2020
Messages
13
Hello everyone,

It has been a while and I am still working on my map. I have tried debugging this "bug" in my map for the past 2 hours and I cannot figure out why it is happening. I am here to ask you guys for help, because I know you are the best.

Problem:
(Sorry, my WE is in the Czech language and i cannot change it.)
I will try to transcript some of it, but most of it should be understandable even with the foreign language.

Events
Unit - Starts an effect of an ability

Conditions
..... equals to gROOT
..... does not equal to player11
..... does not equal to player10

Action
.......
.......Owner of matching unit equals to player10
......
Unitgroup.....
Loop action
...
...
... Unit order to Entangling roots (Picked unit)



// Ok that should do it.

upload_2020-12-23_0-40-24.png




I have
1 Dummy spell (for effect) gROOT
1 Dummy unit to cast the real spell Tester
1 Spell the dummy casts (Entangling roots, 5s)

I modified all the important things (Dummy unit has locust, invis, no collision, 100k mana, max rotation speed, etc.)
Dummy has the real spell on him which has 0 mana cost, instant cast and no requirements.


The above script (trigger) is the only part of my whole map where I do something with gROOT spell.

This trigger works good and does what I needed from it to do. BUT... It triggers itself again inside my other triggers even if I do not cast the gROOT spell....




Only one building has the gROOT spell and I only click it and cast it once in my map, but then when I am doing other stuff and other triggers are doing its part (Mostly manipulating unit groups, moving units, etc.) this spell (gROOT) triggers AGAIN!
I have no idea how this trigger can be run multiple times even though I click my spell only ONCE in my map.

Does that mean my condition of the trigger doesn't work somehow ?


I know it is kind of complicated, but I will appreciate any help from you.

Thanks a lot and have a nice holidays guys :)
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Not sure why that's happening. It might be an issue related to the Channel ability and matching Base Order ids being weird and buggy.

Anyway, here's something I can say to make your trigger better.

Create your Tester only once before you Pick every unit. You only need 1 Dummy unit to cast the spell for all targets, not 1 Dummy per target.
 
Level 2
Joined
May 25, 2020
Messages
13
Hello Uncle and thanks for quick reply.

I have tried that but when I create only 1 tester like shown in image below, then the dummy Tester only casts the entangling roots on one of many units in the selected area.
My spell has got a 0.00s cooldown, infinite range (99999) and 0.00s cast time. I have never done this, but isnt there some kind of a global cooldown which cannot be bypassed?


Btw. it didnt solve my main problem. Again the spell was cast multiple times. My map is a Tower Defense where you send units to the other team and I am using a trigger to Unit - Create a unit facing..... for sending the creeps to the enemy. Maybe this "Create unit" conflicts with creating my dummy somehow?

But shouldn't this trigger run almost like instantly so it doesnt conflict with other triggers using Last created unit ......... ?



upload_2020-12-23_1-36-34.png
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
That tells me that your Dummy unit isn't setup properly.

Set the Dummy unit's Art - Cast Backswing and Art - Cast Point to 0.00. Then set it's Movement Type to None and Speed Base to 0.

Then after that make sure the only ability your Dummy has is Locust. You can set it's Model to a blank path like "none" if you don't want it to be visible, there's no need for invisibility.

Then add the Entangling Roots ability to your Dummy unit in your Root trigger.

-Create 1 Tester...
-Add Entangling Roots to (Last created unit)

Try those changes out and see if it solves anything.

If it keeps having problems, double check that you did the changes correctly, and then try adding some "debug" text messages.

Like make a trigger that runs whenever a unit casts gROOT, and display a Text Message:
-Display text message (Name of casting unit)

This way you can see the names of the units that are casting the spell, which might help you figure out what's going wrong.
 
Last edited:
Level 2
Joined
May 25, 2020
Messages
13
WOW thanks a lot. One dummy is actually working and now it works as i wanted.
The problem with the multiplecast was somehow triggered by bad EVENT trigger.


I was using - UNIT - Begins Casting instead of Starts the Effect. You couldn't even find my mistake because paradoxically I translated that event as Starts the Effect instead of Begins Casting which I had chosen. :D

Also as a dummy spell I was using Blizzard which I have swapped with AOE silence and that did it.

Everything works now. Thanks a lot for the tips. I am glad I do not need to create a dummy for each unit affected.

+rep Uncle,

Chickn out.
 
Im lazy to read your post, but the solution to the title is simple.
1. make an ability based on channel with tag 'visible' and targt type area
2. put it on your unit
3. create a dummy unit
4. create an actual root ability
5. place the dummy somewhere on the map, and enable it to see the whole map with a trigger
6. create a trigger that checks when your unit casts the channel-based spell
7. create a unit group that takes all enemy units in area targeted
8. order your dummy to cast his root ability on each unit of the group
9. destroy the group and the point
 
Level 2
Joined
May 25, 2020
Messages
13
Thank you for answer Stan.

Luckily it is working now thanks to Uncle's help. Your solution would work too, but it might be more static and since I am using more spells with dummy units, I think it is better to create a dummy, give it the appropriate spell and set expiration timer to destroy it again and spawn it again when it is needed.

I do not think having a static dummy on the map is an elegant solution, but I might be wrong, I am kinda new to triggering. :)
 
Status
Not open for further replies.
Top