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

[Spell] Triggered Bladestorm

Status
Not open for further replies.
Level 5
Joined
Feb 8, 2015
Messages
93
Hi Hive

As the title states, I'd like to create a custom triggered Bladestorm. But I'm not sure how handle it.

It needs to be a channeled spell, in the sense that it lasts, say, 6 seconds, and no other actions can be take while channeling. On the other hand; it can't be a simple channel spell like Tranquility or Big Bad Voodoo, because those abilities cannot be cast while moving.

Doing a damage interval, and playing the blade walk stand spin (or whatever) animation. But I'm not sure which ability to base it off; how do you enforce then "channeling - but can still move" effect? Any suggestions?
 
Level 39
Joined
Feb 27, 2007
Messages
4,992
IMO getting it to function exactly like Bladestorm where you can channel while moving is going to be a bit of work. This thread kind of shows you the process and may give a starting point: Move While Channeling with the Ability 'Channel'? (Like Bladestorm). My suggestion would be to dummy cast silence with "attacks prevented" set to "melee, ranged, spells" on the hero; afaik this will still allow the you to right-click targets as the smart order but it will just move the caster instead of attacking.

The biggest issue here is that Bladestorm has hardcoded magic immunity so it naturally cannot be interrupted by stun/silence. This prevents you from using a silence to prevent spells/attacks like I mentioned above; either you cast that after BS and it fails or you cast it before and BS fails to cast. I assume that this is the reason you can't just use Bladestorm as the base skill and then trigger the other effects you want on top of it? If the issue is an orderstring conflict where you need multiple spells based on Bladestorm on the same unit, there is a way around that.

Going with a dummy spell that is not BS:
  1. Cast the self-disable silence.
  2. Start a timer counting down the BS duration; at the end of this countdown you'll have to set the spell's cooldown appropriately.
  3. Check for stun/silence on the caster to manually interrupt this timer countdown. Stun is easy because a unit is issued an order when it happens, but I'm not sure such an order exists for silences. When this happens, interrupt the timer from 2, remove the self-disable silence buff, and put the spell on cooldown.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,509
Question, can you turn off the channeling early by pressing Stop, becoming stunned, or becoming silenced?

So the basic idea would be to disarm the unit and disable it's abilities for the duration. Then have a periodic timer that deals damage to nearby units. Finally, use SetUnitAnimationIndex to play the unit's spin animation for the duration.
  • Custom script: call SetUnitAnimationByIndex(udg_unit, udg_integer)
How you could do this:
1) You could have a Dummy unit use the Drunken Haze ability on your Hero. Set Drunken Haze's Attacks Prevented to Melee, Ranged, Special, Spells. Also, set it's Area of Effect to 0.
2) You could add Cargo Hold (Orc Burrow) to the Hero to disarm it and disable it's abilities via triggers.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
I would imagine the easiest solution would be to use Blade Storm as the base and add a periodic trigger element to it. One should be able to detect when Blade Storm is cast and ends and hence turn on and off the periodic trigger element. This periodic trigger could enumerate units around the unit casting bladestorm (as detected by an on cast trigger) and filter for units within the area of effect and deal damage to them.
 
Level 5
Joined
Feb 8, 2015
Messages
93
Replying to a few comments at a time here:

I realize that Bladestrom makes you inherently Magic Immune while channeling and, in fact, that was one of the major reasons why I wanted to trigger it; not only to deal triggered damage, but also to avoid the Magic Immunity and such.

But a Ranged/Melee Attacks preventing Silence, should do it. Then I'd have to couple it with triggers that remove the "Silence" debuff when the caster is stunned, or otherwise stops channeling?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,509
Just to clarify, you don't HAVE to end the Bladestorm prematurely because of one of those disabling effects. That's just an option available to you.

Anyway, here's a map with an example of what you could do. It's not MUI but it should be leakless and lead you in the right direction.

You can edit the conditions in the Bladestorm Timer trigger to add your own Stun/Silence buffs. Or you can remove these buffs (In this case Stunned (Pause) and Silence) if you don't want those to interrupt the spell.
Here are the triggers:
  • Bladestorm Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Bladestorm (Custom)
    • Actions
      • -------- Setup Variables --------
      • Set BladestormCaster = (Triggering unit)
      • Set BladestormDuration = 5.00
      • Set Point = (Position of BladestormCaster)
      • -------- --- --------
      • -------- Create the Dummy Unit and apply Drunken Haze to our Hero --------
      • Unit - Create 1 Dummy for (Triggering player) at Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Point)
      • Unit - Add Bladestorm Disable (Custom) to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Drunken Haze BladestormCaster
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • -------- --- --------
      • -------- Start the Bladestorm Timer --------
      • Countdown Timer - Start BladestormTimer as a Repeating timer that will expire in 0.10 seconds
      • -------- --- --------
      • -------- Play the Animation --------
      • Animation - Add the Spin animation tag to BladestormCaster
  • Bladestorm Timer
    • Events
      • Time - BladestormTimer expires
    • Conditions
    • Actions
      • -------- Countdown the Duration of Bladestorm --------
      • Set BladestormDuration = (BladestormDuration - 0.10)
      • -------- --- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (BladestormCaster is alive) Equal to True
          • BladestormDuration Greater than 0.00
          • (BladestormCaster has buff Stunned (Pause)) Equal to False
          • (BladestormCaster has buff Silence) Equal to False
        • Then - Actions
          • -------- Damage nearby enemy ground units --------
          • Set Point = (Position of BladestormCaster)
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within 200.00 of Point) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) belongs to an enemy of (Owner of BladestormCaster)) Equal to True
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) is A structure) Equal to False
                  • ((Picked unit) is A flying unit) Equal to False
                  • ((Picked unit) is hidden) Equal to False
                  • ((Picked unit) is invulnerable) Equal to False
                • Then - Actions
                  • Unit - Cause BladestormCaster to damage (Picked unit), dealing 10.00 damage of attack type Spells and damage type Normal
                • Else - Actions
          • Custom script: call RemoveLocation(udg_Point)
        • Else - Actions
          • -------- If the Duration has ended or the Caster has become Stunned/Silenced then end the spell --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (BladestormCaster has buff Bladestorm (Custom)) Equal to True
            • Then - Actions
              • Unit - Remove Bladestorm (Custom) buff from BladestormCaster
            • Else - Actions
          • Animation - Remove the Spin animation tag to BladestormCaster
          • Countdown Timer - Pause BladestormTimer

Note that BladestormTimer checks for Stuns/Silences every 0.10 seconds so there's a chance that a Stun or Silence will slip past it. For instance, if you applied a 0.01 second Stun to the Hero, there's a good chance that the Timer would never detect it thus the Bladestorm wouldn't get interrupted. To fix this, you'd have to trigger your Stuns/Silences to interrupt Bladestorm upon being applied with something like this:
  • Stun Example
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) has buff Bladestorm (Custom)) Equal to True
        • Then - Actions
          • Set BladestormDuration = 0.00
        • Else - Actions
^ Or use a Damage Detection System to get the exact moment that the Stun hits the Hero. Personally I like to avoid using any Object Editor abilities like Storm Bolt and Silence and instead code my Stuns/Silences/Disables with triggers so I can easily manage situations like this.
 

Attachments

  • Bladestorm 1.w3x
    20.9 KB · Views: 101
Last edited:
Level 5
Joined
Feb 8, 2015
Messages
93
Thanks for all the replies guys; I tried to build in a "stop when stunned" mechanic, but didn't seem to work. The Hero just kept on spinning, despite getting hit by a stun (A frost bolt, specifically).

Here's what I have so far. (I did build another trigger to make sure that hitting "Stop" stops the Bladestorm, but right now the Hero ignores stuns)

  • Emberstorm Activate
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Hellion: Emberstorm Dummy
    • Actions
      • Set Hel_Ember_cast = (Triggering unit)
      • Unit Group - Add Hel_Ember_cast to Hel_Ember_CastGroup
      • Set Hel_Ember_Tempp = (Position of Hel_Ember_cast)
      • Animation - Play Hel_Ember_cast's attack walk stand spin animation
      • Animation - Add the Attack Walk Stand Spin animation tag to Hel_Ember_cast
      • -------- Dummy for 'Silence' effect --------
      • Unit - Create 1 Dummy for (Owner of Hel_Ember_cast) at Hel_Ember_Tempp facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Hel_Ember_Tempp)
      • Set Hel_Ember_Tempu = (Last created unit)
      • Unit - Add Hellion: Emberstorm Disable to Hel_Ember_Tempu
      • Unit - Order Hel_Ember_Tempu to Neutral Pandaren Brewmaster - Drunken Haze Hel_Ember_cast
      • Unit - Add a 1.00 second Generic expiration timer to Hel_Ember_Tempu
      • -------- Loop --------
      • Set Hel_Ember_Dur[(Custom value of Hel_Ember_cast)] = 6.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Emberstorm Loop <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Emberstorm Loop <gen>
        • Else - Actions
  • Emberstorm Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Hel_Ember_CastGroup and do (Actions)
        • Loop - Actions
          • Set Hel_Ember_picked = (Picked unit)
          • Set Hel_Ember_Dur[(Custom value of Hel_Ember_picked)] = (Hel_Ember_Dur[(Custom value of Hel_Ember_picked)] - 0.05)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Hel_Ember_picked has buff Stunned) Equal to False
              • (Hel_Ember_picked has buff Stunned (Pause)) Equal to False
              • Hel_Ember_Dur[(Custom value of Hel_Ember_picked)] Greater than or equal to 0.05
            • Then - Actions
              • Set Hel_Ember_DPS = ((30.00 + ((Real((Level of Hellion: Emberstorm Dummy for Hel_Ember_picked))) x 70.00)) + ((Real((Agility of Hel_Ember_picked (Include bonuses)))) x 0.80))
              • -------- Hasn't been stopped; will now deal damage --------
              • Set Hel_Ember_Tempp = (Position of Hel_Ember_picked)
              • Set Hel_Ember_Tempug = (Units within 200.00 of Hel_Ember_Tempp)
              • Custom script: call RemoveLocation(udg_Hel_Ember_Tempp)
              • Unit Group - Pick every unit in Hel_Ember_Tempug and do (Actions)
                • Loop - Actions
                  • Set Hel_Ember_Tempu = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Hel_Ember_Tempu is A structure) Equal to False
                      • (Hel_Ember_Tempu is A flying unit) Equal to False
                      • (Hel_Ember_Tempu is being transported) Equal to False
                      • (Hel_Ember_Tempu belongs to an enemy of (Owner of Hel_Ember_picked)) Equal to True
                      • (Hel_Ember_Tempu is alive) Equal to True
                    • Then - Actions
                      • Unit - Cause Hel_Ember_picked to damage Hel_Ember_Tempu, dealing (Hel_Ember_DPS / 20.00) damage of attack type Normal and damage type Normal
                    • Else - Actions
              • Custom script: call DestroyGroup(udg_Hel_Ember_Tempug)
            • Else - Actions
              • Set Hel_Ember_Dur[(Custom value of Hel_Ember_picked)] = 0.00
              • -------- Duration expired and/or Hero has been Stunned --------
              • Unit - Remove Emberstorm Buff (Silence) buff from Hel_Ember_picked
              • Unit Group - Remove Hel_Ember_picked from Hel_Ember_CastGroup
              • Animation - Remove the Attack Walk Stand Spin animation tag to Hel_Ember_picked
              • -------- Stops the Trigger if no one is channeling the spell (MUI) --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in Hel_Ember_CastGroup) Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
 
Status
Not open for further replies.
Top