So
Casting Unit and practically every other
Event Response is treated like a global variable. This means that it can only be set to one thing at a time. So whenever ANY unit, including your Dummy that's casting Aerial Shackles, casts an ability, they become the new
Casting Unit. That's why it lost reference to the original caster of Binding Sun,
Casting Unit was changed to the Dummy unit.
Triggering Unit, however, is a special case that ISN'T treated like a global variable and instead is treated like a local variable. This means that it can't be changed and will remain the same throughout your entire trigger.
Also, is it intentional that you're using the Event? -> A unit
Begins casting an ability
In most cases you want to use: A unit
Starts the effect of an ability
This Event happens the moment the ability goes on cooldown/spends mana/executes it's effects.
Otherwise, with
Begins it's possible that the trigger will run even if the ability is canceled early.
You can test this out by ordering your Hero to cast Binding Sun, then immediately issue a Stop order before the ability finishes. The Event will go off because the unit technically "began casting" the ability, but the ability will not have spent any mana or gone on cooldown. This can be exploited by the player, allowing them to skip the cd/mana cost entirely while still getting the triggered effects of the ability.
Some other notes:
- You never get rid of your Dummy units, at least not in this trigger. You want to add an Expiration Timer to them so that they're removed after some time. If Aerial Shackles lasts 5.00 seconds then I would set their Expiration Timer to something like 5.50 seconds.
- You're leaking Points when you use (Position of Unit), (Target Point of ability being cast), and anything else that references some Point in the world. You can figure out how to deal with leaks here:
Memory Leaks
- You're leaking a Unit Group when you use P
ick every unit in... Again, see the link above for more details.
- You can reference Triggering Player instead of (Owner of Casting Unit) for this particular Event. Triggering Player will be set to the Owner of the Casting Unit by default. This is just a minor optimization.
- I have a feeling that your Dummy unit may not be setup correctly but this is just an assumption. My first post in this thread explains what settings you want:
Dummy Casting Problem