I guess I can see this feeling unintuitive but in my mind that makes perfect sense. The ability is finished/done/over, so it doesn’t really ‘have’ a target point/unit any more. (“But it
did have one before it finished so why can’t it just return that?” Probably something connected internally to the globalness of the ‘ability being cast’ response—the ability cast information is being or has already been garbage collected.)
In any case the issue here is really the event you’re using. 99.5% of the time you should use
Starts the Effect as your spell cast event, since that is the point at which mana is spent, pre-cast animations have played, cooldown is active, and whatever the spell
does is happening (storm bolt projectile is in flight, for example). The other events are for catching specific parts of the spell cast sequence that mostly apply to channeled spells (like Tranquility).
- Order events occur when the unit is ordered, which occur even if the unit is out of range to cast.
- Begins casting is the start of the cast sequence when in range, which I believe is when cast animations start.
- Begins Channeling is something specific to channeled spells, and honestly I don’t know how it’s different from Begins Casting. Something to do with pre-channeling animations. I have never once used this event.
- Effect occurs as described above.
- Stops only applies to channeled spells, and only fires if the channel is interrupted before reaching its full duration. (By being issued another order prematurely or stopped via crowd control effects.)
- Finishes occurs at the end of a successful cast after any associate animations have played, and for channeled spells only fires if the full channel duration is held without interruption.
No, there’s no real way to prevent autocast from being activated. You can catch the autocast orders by ID and order the unit to turn it off again, but the player would still hear the click sound effect and perhaps see the animation briefly. Using a fake unit/hero ability based on channel and then dummy-casting the actual spell is the only real way. That being said, knowing how to do that is an absolutely
vital skill for mapmaking and you should become familiar with it; there are a variety of other reasons you may wish to do a spell cast that way, too.
I just mean changing ability/buff/projectile art, manipulating some of the unused data fields for a given ability, adding animation names/tags or using a dummy to cast the right spell from the right location. Small tweaks that change how the spell feels.