How do you detect channeled item use?

jwallstone

New Member
Reaction score
33
When a hero uses an item like Staff of Teleportation, there's a Casting Delay where the unit is channeling the spell (just like the Archmage's Mass Teleport).

How do I detect when a hero is channeling this? The unit's orderstrings are unfortunately null when doing this. I know about the Unit Uses an Item event, which I could use to set some boolean to indicate that the hero has begun using the item, but how do I detect when it's done?

And, what about when the channeling is interrupted, either by the user or a stunning spell? How can I detect that?

Thanks.
 

eskashaborn

New Member
Reaction score
3
Well... There are several tricks one can use...

First of all there is an event which you may find useful!

Trigger:
  • Events
    • Unit - Archimonde 0051 <gen> Begins channeling an ability


This shows the channeling...
Trigger:
  • Events
    • Unit - Archimonde 0051 <gen> Finishes casting an ability



This shows when he stops channeling

Additionally, one can see how long a spell channels by finding it in the object editor under abilities...items...staff_of_teleportation (or whatever).

Trigger:
  • Events
    • Unit - Archimonde 0051 <gen> Stops casting an ability


This shows your unit was interrupted...

It would be helpful if you could submit your trigger...
But i hope this is helpful...
 

jwallstone

New Member
Reaction score
33
Do these events work for items as well? I assumed they only worked for a unit's abilities. If they work for items as well, then that'll do the trick. Thanks.
 

Vaius

New Member
Reaction score
19
I agree. It should work for items, as it simply detects the channeling of a spell, but not whether it is from an item or a unit. Although, you should use a generic unit event instead of a specific unit event, if the item can be used by more than 1 unit.
 

eskashaborn

New Member
Reaction score
3
I agree...oops
It depends on what you want, but a generic unit event is much safer...
You can always just add a unit comparison condition!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top