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

GUI Event - Finishes Casting vs Begins the Effect of an Ability

Status
Not open for further replies.
Level 11
Joined
Aug 24, 2012
Messages
429
Is there something I am missing about the Unit Finishes Casting an Ability event? Triggers which use it...well they don't seem to trigger at all.

Whereas if I use to the same trigger but use Unit Begins Casting an ability everything works just fine...

It seems that Starts the Effect of an Ability will serve me well as it appears to work and triggers the event after the unit finishes casting. But I would still like to know why Unit Finishes Casting an Ability does not work and Unit Begins Casting does in the same circumstances.
 
Level 6
Joined
May 20, 2014
Messages
228
a) Begins Casting vs Starts the Effect
If you try both these events, you will say that they do the same thing, with no difference. But Blizzard is not stupid. They didn’t add both for nothing. You will notice at a closer look at the small difference if not noticed by the spellmaker can lead to severe bugs, which can be used to abuse the spell.

An Unit Begins Casting an Ability fires the trigger when the unit prepared to cast the ability, just before it wasted the mana or fired the cooldown. Players abusing the spell, by moving the caster just before the cooldown is fired (it’s not even hard to do that), will obtain the effect of the spell without firing the cooldown or losing any mana. This means that they can cast the ability an infinite number of times, with no restrictions. Quite bad eh? And then, you may wonder when should you use this event. Well, by now the sole use I found to it is to validate targets. Object Editor may not always assure the valid targets of the spell for you. In this case, you will need to validate them yourself. Make a trigger which activated by this event checks if the target is valid. If it isn’t, you just order the casting unit to stop, followed by an error message.

An Unit Starts the Effect of an Ability just when the cooldown is fired and the mana is wasted. So yeah, the main trigger which activates when the spell is cast should have this event, in most of the cases atleast.

b) Finishes Casting An Ability and Stops Casting an Ability difference ca be noticed only in the case of the channeling spells.

Finishes Casting an Ability fires the trigger when the unit has fully cast the ability, to its full effect. This means that if a Priestess casts Starfall but a damned Dreadlord casts sleep at her, the trigger will not occur in her case because her ability hasn’t finished casting. It was actually stopped! In conclusion, you may get some errors if you haven’t used the right event.

Stops Casting a Ability fires either when the unit stops casting the ability before it has reached full effect (either willingly or not) or the unit achieves full effect. I believe that this is an error for Blizzard, since normally it shouldn’t occur into the second case as well. But apparently, it does! So if you want to know when to stop the effect of a channeling spell, use this event, instead of “Finishes Casting an Ability”.

source: http://www.hiveworkshop.com/forums/...als-279/basics-trigger-enhancing-spells-7334/
 
Level 11
Joined
Aug 24, 2012
Messages
429
That makes some sense, but the Trigger I was using did not fire even after the ability in question had finished casting.

Secondly, I have tried abusing the Begins Casting event but I could not stop the unit before the cooldown begins and mana is spent. So that tutorial you link does not seem to be entirely accurate, at least to what I experienced using those events.
 
Level 6
Joined
May 20, 2014
Messages
228
It depends on unit's casting point and spell in question, really.

If your unit casting point is 0.00 and the casting time of the spell is 0, then there is no way you can stop it and the trigger will fire anyway, so the spell will go on. Some abilities are also intentionally cast instantly, like wind walk or mana shield, and the trigger will fire on both, but they won't interrupt orders. Etc.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Casting Events Guide will be extremely helpful for you.

So you want to stop casting the spell when there is an invalid case? use Begins Casting then order the unit to stop.
This will work. Just remember to pause the unit before ordering the unit to stop and unpausing it afterwards or this will happen (at least if the ability is based off Channel):

Animation.gif
 
Level 11
Joined
Aug 24, 2012
Messages
429
Well this actually was helpful, I think I have a clearer picture, +Rep to you all. I will stick with Begins casting and Starts the effect for the time being.

But like I said, Unit Finishes Casting does not fire the event at all, even if the unit in question properly finishes the casting animation, mana is spent and cooldown begins. That is my big gripe right now - The Spell in question is the basic Slow of the Sorceress. My simple trigger was this: Unit Finishes Casting an Ability - Ability Equal to Slow - Condition: Target of Ability Cast has Buff = Slow True => Action: Deal 100 damage to target unit.

But this only fires with Begins Casting (I haven't tested Starts an Effect, it should hopefully work). But Slow is not instant cast and Sorceresses do have Backswing Cast points - yet I still cannot manually intrerupt the ability before mana is spent and cooldown fires, it seems to contradict the theoretical abusability of Begins Casting.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
But like I said, Unit Finishes Casting does not fire the event at all, even if the unit in question properly finishes the casting animation, mana is spent and cooldown begins.
(Target unit of ability being cast) with the "Unit Finishes casting" event returns null. You won't be able to deal damage to a null value.

But this only fires with Begins Casting (I haven't tested Starts an Effect, it should hopefully work). But Slow is not instant cast and Sorceresses do have Backswing Cast points - yet I still cannot manually intrerupt the ability before mana is spent and cooldown fires, it seems to contradict the theoretical abusability of Begins Casting.
It's impossible to interrupt "Starts the effect." WC3 has a que system, so you won't be able to interrupt it until after the event has finished.
 
Level 6
Joined
May 20, 2014
Messages
228
Spell backswing point is not same as casting point - backswing is the time of the animation your unit will play after casting a spell, where casting point is before casting a spell.
 
Level 11
Joined
Aug 24, 2012
Messages
429
Spell backswing point is not same as casting point - backswing is the time of the animation your unit will play after casting a spell, where casting point is before casting a spell.

Well the Sorceress has both anyway.

(Target unit of ability being cast) with the "Unit Finishes casting" event returns null. You won't be able to deal damage to a null value.

Ok so this is the main issue then, thanks :) If Starts an Effect cannot be intrerupted and abused that works just fine for me.
 
Level 7
Joined
Oct 19, 2015
Messages
286
"Starts the Effect" is the correct event to use for triggered spells. "Begins casting" is premature, players can get the triggered effect and then interrupt the casting, thus not paying the mana and cooldown cost. On the other hand, "Finishes casting" has the opposite problem where the spell gets cast but the triggered effect does not occur, so this is only useful in the case of channelling spells where you want the triggered effect to happen only if the caster keeps the spell going for the full duration.
 
Status
Not open for further replies.
Top