• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Detecting channeling heroes

Status
Not open for further replies.
Level 14
Joined
Nov 18, 2007
Messages
1,084
Well, this is at the top of my head...
  • Begins Channeling
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Unit Group - Add (Triggering unit) to ChannelingGroup
  • Stop Channeling
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Unit Group - Remove (Triggering unit) from ChannelingGroup
  • Every 1 Second
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ChannelingGroup and do (Actions)
        • Loop - Actions
          • -------- Do something --------
The bad thing about the first trigger is that it puts any unit who casts a spell into ChannelingGroup so it might not give you the effect you like...
 
Level 12
Joined
Mar 23, 2008
Messages
942
Thanks redmarine.

Now I see that I still have the same problem, my skill should deal 100 damage per second channeled. So:

hero1 start channeling
after 0,9s
hero2 start channeling
after 0,1s
hero1 and hero2 got 100 damage.

How can I avoid this?
(Well, if only say "use jass" It will be bad, because I can't really see how to do that with Jass)
 
Level 17
Joined
Jan 21, 2007
Messages
2,014
Maybe check for order?

(matching unit) has order (channeling)

I do not know if channeling is an order, but i do think so.

We still have the problem with it being 1 second to everyone.
I guess you could use my big nono with custom value, every 0.10 seconds of game time pick all units whose order is channeling and add +1 to their custom value. If the custom value is 10, set it to 0 again and damage the unit.
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,267
Detecting channeling units is easy

Event - unit begins channeling an ability

add these units to a unit group


Do whatever you want with the channeling unit group, whatever perioding effects they might have.


When the channeling unit is interrupted, you can use the event triggers detect aborted orders to remove the interrupted unit from the unit group.
 
Status
Not open for further replies.
Top