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

Can this be done with Channel?

Status
Not open for further replies.
Level 8
Joined
Apr 30, 2009
Messages
338
I want to make some channeled spells that have an upkeep cost, and some other stuff. The best example I can think of is if you every played Warhammer Online, there is a spell called Withering Heat. How it works is this:

-Caster loses 13 mana per second
-Channels up to 6 seconds
-Damages and slows target while it's being channeled

Another example would be Mindflay from WoW.

I am wondering if I can do this with a spell based on Channel, by having the Follow-Through Time set to 6 seconds, and giving it one of those invisible buffs that goes on the caster of a channeled spell. Or will I have to base it on some other targeted channel like Drain?

I guess I'm just not so sure what Follow through time is.
 
Level 5
Joined
May 3, 2009
Messages
129
you mean somthing like this ?
  • channel
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Blizzard
    • Actions
      • Set castingunit[(Player number of (Owner of (Triggering unit)))] = (Casting unit)
      • Unit - Create 1 dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
      • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Human Priest - Inner Fire (Triggering unit)
  • Loop channel
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Mana of castingunit[(Integer A)]) Less than or equal to 1.00
              • (castingunit[(Integer A)] has buff Inner Fire) Equal to True
            • Then - Actions
              • Unit - Remove Inner Fire buff from castingunit[(Integer A)]
              • Unit - Order castingunit[(Integer A)] to Stop
            • Else - Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (castingunit[(Integer A)] has buff Inner Fire) Equal to True
            • Then - Actions
              • Unit - Set mana of castingunit[(Integer A)] to ((Mana of castingunit[(Integer A)]) - 13.00)
            • Else - Actions
  • stops channel
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Blizzard
    • Actions
      • Unit - Remove Inner Fire buff from (Triggering unit)
i guess this it what you are thimnking of
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
you mean somthing like this ?
  • channel
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Blizzard
    • Actions
      • Set castingunit[(Player number of (Owner of (Triggering unit)))] = (Casting unit)
      • Unit - Create 1 dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
      • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Human Priest - Inner Fire (Triggering unit)
  • Loop channel
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Mana of castingunit[(Integer A)]) Less than or equal to 1.00
              • (castingunit[(Integer A)] has buff Inner Fire) Equal to True
            • Then - Actions
              • Unit - Remove Inner Fire buff from castingunit[(Integer A)]
              • Unit - Order castingunit[(Integer A)] to Stop
            • Else - Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (castingunit[(Integer A)] has buff Inner Fire) Equal to True
            • Then - Actions
              • Unit - Set mana of castingunit[(Integer A)] to ((Mana of castingunit[(Integer A)]) - 13.00)
            • Else - Actions
  • stops channel
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Blizzard
    • Actions
      • Unit - Remove Inner Fire buff from (Triggering unit)
i guess this it what you are thimnking of

1. Leaks position
2. Multiple Integer A cause bugs
3. Why you remove the buff from Triggering Unit when you have set it into a veriable?

Don't confuse the guy, this not even close to what he wanted, and the spell should be targeted, if don't know what "Like Mindflay from WoW" means, try google it.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
1. Leaks position
qft.
About time people learn it ^^

2. Multiple Integer A cause bugs
Well, actually: it only bugs when 2 Integer A-loops are used inside eachother, or in different triggers (when activated at the same time), when in the same trigger they don't bug.
However, using "For each integer Variable" is a far better idea, as Integer A (and B) are BJ's and therefore slower.

So you were partially right: Integer A isn't good ^^

Apart from these things, the spell isn't MUI, so if it is used multiple times by the same player it will bug.
(Yeah, okay... this might be for an RPG, but who knows?)
 
Level 8
Joined
Apr 30, 2009
Messages
338
I really can do it myself with hashtables, just wanted to know if I could base the spell on Channel or if I had to already use a spell that gave the caster a channeling buff like life drain
 
To answer you question: Yes you can use Channel.
I would set the cooldown longer than 6 seconds or else the user will be able to cast it again after finishing without waiting.

To detect if the unit finished/stopped the ability while casting you simply do:
  • Trigger
    • Events
      • Unit - A unit Stops casting an ability
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Skill
    • Actions
 
Status
Not open for further replies.
Top