• 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.

Chain lightning issue.

Status
Not open for further replies.
Level 12
Joined
Dec 2, 2016
Messages
733
This this ability grounded, when the chainlightning is casted. It applies the 'grounded' ability shortly after. When this buff is applied chain lightning does 60% less damage.

This trigger works for maybe 2-3 times, and properly removes the buff. But after that even if it's the first chain the buff is always applied and is doing 60% less damage.
Any idea what could be causing this?

  • Chain buff
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Chain of Death
          • isGrounded Equal to False
        • Then - Actions
          • Set isGrounded = True
          • Wait 0.10 seconds
          • Game - Display to (All players) the text: yes
          • Unit - Add Grounded to (Target unit of ability being cast)
          • Wait 8.00 seconds
          • Set isGrounded = False
          • Game - Display to (All players) the text: off
          • Unit - Remove Grounded from (Target unit of ability being cast)
        • Else - Actions
 
Level 9
Joined
Apr 23, 2011
Messages
527
Since the trigger is using waits, it's not MUI, and will break when the caster targets a different unit while the buff is active.

A solution would be to add the target to a unit group when the ability is cast and then make a dummy cast a Grounded debuff on the unit that lasts for 8 seconds. Pick every unit in the unit group and check if each unit still has the Grounded debuff. If not, remove it from the unit group.

I'm assuming the "chain lightning" doesn't chain to multiple targets.
 
That's a very good way to have control over waiting periods in GUI: MUI Spells Using Artificial Waits

"isGrounded" is also only one global variable, so be aware of it may be overwritten, as it may be used for potentially all units at same time.

By the way, using Waits won't make a trigger necessarily un-MUI, if you think of TriggeringUnit( ) for example. And then we can think of Event Response Myths, too.
 

EdgeOfChaos

E

EdgeOfChaos

Instead of checking the grounded variable: check whether or not the unit has ability "Grounded".
Even though it's not fully 'correct' still, that should make it perform as you expect.

If you want to go the variable route, then you'll have to make it a boolean array. The index accessed would be the custom value of the unit. Make sure to download a unit indexer in that case.
 
Level 12
Joined
Dec 2, 2016
Messages
733
The problem with this is that if two players chain at exactly the same time the buff wont get applied and the unit will insta die(normally wouldn't if the 2nd unit had the buff) at least using the wait.

Do you think I need to use a damage engine to achieve this?

And if I did use a DDS, could I check if the spell's damage finished and then apply the buff to nearby units?
 
Status
Not open for further replies.
Top