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!
Is there a way to detect canceling an ability? Essentially, after one clicks on the ability and the little targeting cursor comes up, is there a way to detect canceling from that?
Is there a way to detect canceling an ability? Essentially, after one clicks on the ability and the little targeting cursor comes up, is there a way to detect canceling from that?
^ There is no order yet during the time that you are to select the target of the order to be issued...
anyway, since there are lots of ways to cancel it, and the only one you can pick up is the press of the ESC button, it will be somewhat impossible to totally do...
You can detect some, but not all of them. Combining an Issued Order wich can be canceled, and setting a Boolean to "True", then check if the player press ESC while Boolean is True, means "cancel", else, the Cancel order Kala suggested.
That's why I said "Some (abilities)". Buildings, Constructions, Upgrades, Channel abilities, etc. can be detected, therefore, detect the cancel with ESC or with Cancel Order.
I believe orders are only given once the target is picked, and judging from the quoted statement, he is asking about detecting when a player cancels during the time between the ability click and the choosing of target, meaning no order yet exists... so how will you couple detecting the over-time cancellable order + ESC event if the order doesn't even exist on the first place?
example I click an aoe targeted ability, then before I choose a location on where to cast it, I decided not to cast it... that is the type of cancelling that he wants to detect and not cancelling an on-going ability...
at least that's what I understood from his statement...
edit:
hmmm.... you better try kala's suggestion... though I think it will work for all cancelations, which might not be always good
Then what event would I use? I tried the "Unit is issued order targeting an object/point/no target" with the text to see if any of them were triggered by the canceling, and none were.
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.