1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Lightning problem in spell

Discussion in 'Triggers & Scripts' started by FeelsGoodMan, Nov 7, 2019.

  1. FeelsGoodMan

    FeelsGoodMan

    Joined:
    Dec 13, 2018
    Messages:
    574
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Alright so this is gonna be a long one. There's only a couple of triggers that you need to focus on, but I will post everything further down. So basically what happens is that I have a spell that creates three rotating orbs around the caster. The orbs has lightnings from the orb to the caster. This works fine, but as soon as I cast one of the other abilities the caster has one of the lightnings disappears from the orb, and won't appear the next times I cast the orb spell. Here's a video to show what I mean:



    The orb spell and the other spell that messes up the orb spell doesn't share any variables, but they do use the same lightning type. Surely that shouldn't matter?

    Here's the orb spell (Yeah there's a lot of triggers but not all of them are necessary to look at):

    Mainly look at the triggers named "Cast Wheel of Darkness" and "Set Dummy Locations at Hero" in the first spell and "Shadow Grip" and "Shadow Grip Move Beam" in the second spell.

    • Cast Wheel of Darkness
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to Wheel of Darkness
      • Actions
        • -------- ---- --------
        • -------- Configuration --------
        • -------- ---- --------
        • Set BH_Damage = 75.00
        • Set BH_AoE = 200.00
        • Set BH_RotateSpeed = 5.00
        • Set BH_OffsetDistance = 350.00
        • Set BH_Duration = 30.01
        • Set BH_HealFrequency = 5.00
        • Set BH_HealAmount = 50.00
        • -------- ---- --------
        • -------- This only sets the mode the first time the spell is used. The mode can be changed through triggers or items another time. --------
        • -------- ---- --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Execution count of (This trigger)) Equal to 1
          • Then - Actions
            • Set Mode = True
          • Else - Actions
        • -------- ---- --------
        • -------- "BH_KillDurationIncrease" and "BH_MovementSpeedCloserToHero" should not both be positive values at the same time. One of them should be 0 as they are different modes. --------
        • -------- ---- --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Mode Equal to True
          • Then - Actions
            • Set BH_KillDurationIncrease = 0.00
            • Set BH_MovementSpeedCloserToHero = 0.12
          • Else - Actions
            • Set BH_KillDurationIncrease = 1.00
            • Set BH_MovementSpeedCloserToHero = 0.00
        • -------- ---- --------
        • -------- Initiate --------
        • -------- ---- --------
        • Set TempLocation = (Position of Hero)
        • If (BH_KillDurationIncrease Greater than 0.00) then do (Unit - For Hero, Ability Wheel of Darkness , Disable ability: True, Hide UI: False) else do (Do nothing)
        • Sound - Play SiphonManaLoop <gen> at 100.00% volume, attached to Hero
        • Set BlackHoleSound = (Last played sound)
        • -------- Create Dummies 1-3 --------
        • Unit - Create 1 Generic Dummy for Player 1 (Red) at TempLocation facing 0.00 degrees
        • Set BlackHoleDummy[1] = (Last created unit)
        • Unit - Create 1 Generic Dummy for Player 1 (Red) at TempLocation facing 120.00 degrees
        • Set BlackHoleDummy[2] = (Last created unit)
        • Unit - Create 1 Generic Dummy for Player 1 (Red) at TempLocation facing 240.00 degrees
        • Set BlackHoleDummy[3] = (Last created unit)
        • Set BlackHolePoint[1] = (TempLocation offset by BH_OffsetDistance towards (Facing of BlackHoleDummy[1]) degrees)
        • Set BlackHolePoint[2] = (TempLocation offset by BH_OffsetDistance towards (Facing of BlackHoleDummy[2]) degrees)
        • Set BlackHolePoint[3] = (TempLocation offset by BH_OffsetDistance towards (Facing of BlackHoleDummy[3]) degrees)
        • -------- Create Dummies 4-6 --------
        • Unit - Create 1 Black Hole for Player 1 (Red) at BlackHolePoint[1] facing 0.00 degrees
        • Set BlackHoleDummy[4] = (Last created unit)
        • Unit - Create 1 Black Hole for Player 1 (Red) at BlackHolePoint[2] facing 0.00 degrees
        • Set BlackHoleDummy[5] = (Last created unit)
        • Unit - Create 1 Black Hole for Player 1 (Red) at BlackHolePoint[3] facing 0.00 degrees
        • Set BlackHoleDummy[6] = (Last created unit)
        • -------- ---- --------
        • -------- Lightning --------
        • -------- ---- --------
        • -------- 1 --------
        • Set LP1[1] = BlackHolePoint[1]
        • Set LP1[2] = (Position of Hero)
        • Custom script: set udg_BHL[1] = AddLightningEx("DRAM", true , GetLocationX(udg_LP1[1]), GetLocationY(udg_LP1[1]), GetLocationZ(udg_LP1[1]) + 70, GetLocationX(udg_LP1[2]), GetLocationY(udg_LP1[2]), GetLocationZ(udg_LP1[2]) + 70)
        • Lightning - Change color of BHL[1] to (1.00 0.00 1.00) with 1.00 alpha
        • -------- 2 --------
        • Set LP2[1] = BlackHolePoint[2]
        • Set LP2[2] = (Position of Hero)
        • Custom script: set udg_BHL[2] = AddLightningEx("DRAM", true , GetLocationX(udg_LP2[1]), GetLocationY(udg_LP2[1]), GetLocationZ(udg_LP2[1]) + 70, GetLocationX(udg_LP2[2]), GetLocationY(udg_LP2[2]), GetLocationZ(udg_LP2[2]) + 70)
        • Lightning - Change color of BHL[2] to (1.00 0.00 1.00) with 1.00 alpha
        • -------- 3 --------
        • Set LP3[1] = BlackHolePoint[3]
        • Set LP3[2] = (Position of Hero)
        • Custom script: set udg_BHL[3] = AddLightningEx("DRAM", true , GetLocationX(udg_LP3[1]), GetLocationY(udg_LP3[1]), GetLocationZ(udg_LP3[1]) + 70, GetLocationX(udg_LP3[2]), GetLocationY(udg_LP3[2]), GetLocationZ(udg_LP3[2]) + 70)
        • Lightning - Change color of BHL[3] to (1.00 0.00 1.00) with 1.00 alpha
        • -------- ---- --------
        • -------- Periodic Stuff and Timer --------
        • -------- ---- --------
        • Trigger - Turn on Wheel of Darkness Damage <gen>
        • Trigger - Turn on Set Dummy Locations at Hero <gen>
        • Countdown Timer - Start BlackHoleTimer as a One-shot timer that will expire in BH_Duration seconds
        • Countdown Timer - Start BlackHoleHealTimer as a One-shot timer that will expire in BH_HealFrequency seconds
        • -------- ---- --------
        • -------- Remove Leaks --------
        • -------- ---- --------
        • Custom script: call RemoveLocation (udg_TempLocation)
        • Custom script: call RemoveLocation (udg_BlackHolePoint[1])
        • Custom script: call RemoveLocation (udg_BlackHolePoint[2])
        • Custom script: call RemoveLocation (udg_BlackHolePoint[3])
        • Custom script: call RemoveLocation (udg_LP1[1])
        • Custom script: call RemoveLocation (udg_LP1[2])
        • Custom script: call RemoveLocation (udg_LP2[1])
        • Custom script: call RemoveLocation (udg_LP2[2])
        • Custom script: call RemoveLocation (udg_LP3[1])
        • Custom script: call RemoveLocation (udg_LP3[2])

    • Set Dummy Locations at Hero
      • Events
        • Time - Every 0.01 seconds of game time
      • Conditions
      • Actions
        • -------- Dummy 1 --------
        • Set TempLocation = (Position of Hero)
        • Custom script: call SetUnitY(udg_BlackHoleDummy[1], GetLocationY(udg_TempLocation))
        • Custom script: call SetUnitX(udg_BlackHoleDummy[1], GetLocationX(udg_TempLocation))
        • -------- Dummy 2 --------
        • Custom script: call SetUnitY(udg_BlackHoleDummy[2], GetLocationY(udg_TempLocation))
        • Custom script: call SetUnitX(udg_BlackHoleDummy[2], GetLocationX(udg_TempLocation))
        • -------- Dummy 3 --------
        • Custom script: call SetUnitY(udg_BlackHoleDummy[3], GetLocationY(udg_TempLocation))
        • Custom script: call SetUnitX(udg_BlackHoleDummy[3], GetLocationX(udg_TempLocation))
        • -------- ---- --------
        • -------- Offset Dummies --------
        • -------- ---- --------
        • Set BlackHolePoint[1] = (TempLocation offset by (BH_OffsetDistance - BH_MovementSpeedCloserToHero) towards ((Facing of BlackHoleDummy[1]) + BH_RotateSpeed) degrees)
        • Set BlackHolePoint[2] = (TempLocation offset by (BH_OffsetDistance - BH_MovementSpeedCloserToHero) towards ((Facing of BlackHoleDummy[2]) + BH_RotateSpeed) degrees)
        • Set BlackHolePoint[3] = (TempLocation offset by (BH_OffsetDistance - BH_MovementSpeedCloserToHero) towards ((Facing of BlackHoleDummy[3]) + BH_RotateSpeed) degrees)
        • Set BH_OffsetDistance = (BH_OffsetDistance - BH_MovementSpeedCloserToHero)
        • -------- ---- --------
        • -------- Rotate Dummies --------
        • -------- ---- --------
        • Unit - Make BlackHoleDummy[1] face BlackHolePoint[1] over 0.00 seconds
        • Unit - Make BlackHoleDummy[2] face BlackHolePoint[2] over 0.00 seconds
        • Unit - Make BlackHoleDummy[3] face BlackHolePoint[3] over 0.00 seconds
        • -------- ---- --------
        • -------- Set Black Hole Location --------
        • -------- ---- --------
        • -------- Dummy 4 --------
        • Custom script: call SetUnitY(udg_BlackHoleDummy[4], GetLocationY(udg_BlackHolePoint[1]))
        • Custom script: call SetUnitX(udg_BlackHoleDummy[4], GetLocationX(udg_BlackHolePoint[1]))
        • -------- Dummy 5 --------
        • Custom script: call SetUnitY(udg_BlackHoleDummy[5], GetLocationY(udg_BlackHolePoint[2]))
        • Custom script: call SetUnitX(udg_BlackHoleDummy[5], GetLocationX(udg_BlackHolePoint[2]))
        • -------- Dummy 6 --------
        • Custom script: call SetUnitY(udg_BlackHoleDummy[6], GetLocationY(udg_BlackHolePoint[3]))
        • Custom script: call SetUnitX(udg_BlackHoleDummy[6], GetLocationX(udg_BlackHolePoint[3]))
        • -------- ---- --------
        • -------- Move Lightning --------
        • -------- ---- --------
        • -------- 1 --------
        • Set LP1[1] = BlackHolePoint[1]
        • Set LP1[2] = (Position of Hero)
        • Custom script: call MoveLightningEx(udg_BHL[1], true , GetLocationX(udg_LP1[1]), GetLocationY(udg_LP1[1]), GetLocationZ(udg_LP1[1]) + 70, GetLocationX(udg_LP1[2]), GetLocationY(udg_LP1[2]), GetLocationZ(udg_LP1[2]) + 70)
        • -------- 2 --------
        • Set LP2[1] = BlackHolePoint[2]
        • Set LP2[2] = (Position of Hero)
        • Custom script: call MoveLightningEx(udg_BHL[2], true , GetLocationX(udg_LP2[1]), GetLocationY(udg_LP2[1]), GetLocationZ(udg_LP2[1]) + 70, GetLocationX(udg_LP2[2]), GetLocationY(udg_LP2[2]), GetLocationZ(udg_LP2[2]) + 70)
        • -------- 3 --------
        • Set LP3[1] = BlackHolePoint[3]
        • Set LP3[2] = (Position of Hero)
        • Custom script: call MoveLightningEx(udg_BHL[3], true , GetLocationX(udg_LP3[1]), GetLocationY(udg_LP3[1]), GetLocationZ(udg_LP3[1]) + 70, GetLocationX(udg_LP3[2]), GetLocationY(udg_LP3[2]), GetLocationZ(udg_LP3[2]) + 70)
        • -------- ---- --------
        • -------- Clear Leaks --------
        • -------- ---- --------
        • Custom script: call RemoveLocation (udg_TempLocation)
        • Custom script: call RemoveLocation (udg_BlackHolePoint[1])
        • Custom script: call RemoveLocation (udg_BlackHolePoint[2])
        • Custom script: call RemoveLocation (udg_BlackHolePoint[3])
        • Custom script: call RemoveLocation (udg_LP1[1])
        • Custom script: call RemoveLocation (udg_LP1[2])
        • Custom script: call RemoveLocation (udg_LP2[1])
        • Custom script: call RemoveLocation (udg_LP2[2])
        • Custom script: call RemoveLocation (udg_LP3[1])
        • Custom script: call RemoveLocation (udg_LP3[2])

    • Wheel of Darkness Damage
      • Events
        • Time - Every 0.50 seconds of game time
      • Conditions
      • Actions
        • -------- ---- --------
        • -------- Group 1 --------
        • -------- ---- --------
        • Set TempLocation = (Position of BlackHoleDummy[4])
        • Set BlackHoleGroup[1] = (Units within BH_AoE of TempLocation matching (((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True))
        • Unit Group - Pick every unit in BlackHoleGroup[1] and do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Picked unit) is A structure) Equal to False
                • ((Picked unit) is Mechanical) Equal to False
                • ((Picked unit) is Magic Immune) Equal to False
                • ((Picked unit) is invulnerable) Equal to False
              • Then - Actions
                • Unit - Cause Hero to damage (Picked unit), dealing BH_Damage damage of attack type Spells and damage type Magic
              • Else - Actions
        • Custom script: call DestroyGroup (udg_BlackHoleGroup[1])
        • Custom script: call RemoveLocation (udg_TempLocation)
        • -------- ---- --------
        • -------- Group 2 --------
        • -------- ---- --------
        • Set TempLocation = (Position of BlackHoleDummy[5])
        • Set BlackHoleGroup[2] = (Units within BH_AoE of TempLocation matching (((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True))
        • Unit Group - Pick every unit in BlackHoleGroup[2] and do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Picked unit) is A structure) Equal to False
                • ((Picked unit) is Mechanical) Equal to False
                • ((Picked unit) is Magic Immune) Equal to False
                • ((Picked unit) is invulnerable) Equal to False
              • Then - Actions
                • Unit - Cause Hero to damage (Picked unit), dealing BH_Damage damage of attack type Spells and damage type Magic
              • Else - Actions
        • Custom script: call DestroyGroup (udg_BlackHoleGroup[2])
        • Custom script: call RemoveLocation (udg_TempLocation)
        • -------- ---- --------
        • -------- Group 3 --------
        • -------- ---- --------
        • Set TempLocation = (Position of BlackHoleDummy[6])
        • Set BlackHoleGroup[3] = (Units within BH_AoE of TempLocation matching (((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True))
        • Unit Group - Pick every unit in BlackHoleGroup[3] and do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Picked unit) is A structure) Equal to False
                • ((Picked unit) is Mechanical) Equal to False
                • ((Picked unit) is Magic Immune) Equal to False
                • ((Picked unit) is invulnerable) Equal to False
              • Then - Actions
                • Unit - Cause Hero to damage (Picked unit), dealing BH_Damage damage of attack type Spells and damage type Magic
              • Else - Actions
        • Custom script: call DestroyGroup (udg_BlackHoleGroup[3])
        • Custom script: call RemoveLocation (udg_TempLocation)

    • Wheel of Darkness Timer Expires
      • Events
        • Time - BlackHoleTimer expires
      • Conditions
      • Actions
        • Trigger - Run Disable Wheel of Darkness <gen> (checking conditions)

    • Hero Dies Disable Spell
      • Events
        • Unit - A unit Dies
      • Conditions
        • (Triggering unit) Equal to Hero
      • Actions
        • Trigger - Run Disable Wheel of Darkness <gen> (checking conditions)

    • Disable Wheel of Darkness
      • Events
      • Conditions
      • Actions
        • Unit - Remove BlackHoleDummy[1] from the game
        • Unit - Remove BlackHoleDummy[2] from the game
        • Unit - Remove BlackHoleDummy[3] from the game
        • Unit - Kill BlackHoleDummy[4]
        • Unit - Kill BlackHoleDummy[5]
        • Unit - Kill BlackHoleDummy[6]
        • Sound - Stop BlackHoleSound After fading
        • Lightning - Destroy BHL[1]
        • Lightning - Destroy BHL[2]
        • Lightning - Destroy BHL[3]
        • Countdown Timer - Pause BlackHoleHealTimer
        • Unit - For Hero, Ability Wheel of Darkness , Disable ability: False, Hide UI: False
        • If ((BH_MovementSpeedCloserToHero Greater than 0.00) and ((Hero is alive) Equal to True)) then do (Wait 1.00 seconds) else do (Do nothing)
        • Trigger - Turn off Wheel of Darkness Damage <gen>
        • Trigger - Turn off Set Dummy Locations at Hero <gen>

    • Wheel of Darkness Heal Timer
      • Events
        • Time - BlackHoleHealTimer expires
      • Conditions
      • Actions
        • Unit - Set life of Hero to ((Life of Hero) + BH_HealAmount)
        • Set RandomAngle = (Random real number between 45.00 and 135.00)
        • Set TempLocation = (Position of Hero)
        • Floating Text - Create floating text that reads (|cff00ff00+ + ((String((Integer(BH_HealAmount)))) + |r)) at TempLocation with Z offset 75.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        • Custom script: call RemoveLocation(udg_TempLocation)
        • Floating Text - Set the velocity of (Last created floating text) to 120.00 towards RandomAngle degrees
        • Floating Text - Change (Last created floating text): Disable permanence
        • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
        • Countdown Timer - Start BlackHoleHealTimer as a One-shot timer that will expire in BH_HealFrequency seconds

    • Wheel of Darkness Dummy Remover
      • Events
        • Unit - A unit Dies
      • Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • (Triggering unit) Equal to BlackHoleDummy[4]
            • (Triggering unit) Equal to BlackHoleDummy[5]
            • (Triggering unit) Equal to BlackHoleDummy[6]
      • Actions
        • Wait 2.00 seconds
        • Unit - Remove (Triggering unit) from the game

    • Unit Killed By Wheel of Darkness
      • Events
        • Unit - A unit Dies
      • Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • ((Triggering unit) is in BlackHoleGroup[1]) Equal to True
            • ((Triggering unit) is in BlackHoleGroup[2]) Equal to True
            • ((Triggering unit) is in BlackHoleGroup[3]) Equal to True
      • Actions
        • Set BlackHoleTimeRemaining = ((Remaining time for BlackHoleTimer) + BH_KillDurationIncrease)
        • Countdown Timer - Start BlackHoleTimer as a One-shot timer that will expire in BlackHoleTimeRemaining seconds

    • Weapon and Armor Type
      • Events
        • Game - DamageModifierEvent becomes Equal to 1.00
      • Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • (DamageEventTarget is in BlackHoleGroup[1]) Equal to True
            • (DamageEventTarget is in BlackHoleGroup[2]) Equal to True
            • (DamageEventTarget is in BlackHoleGroup[3]) Equal to True
      • Actions
        • Set DamageEventWeaponT = WEAPON_TYPE_WM_BASH
        • Set DamageEventArmorT = ARMOR_TYPE_ETHEREAL




    Here's the other spell that messes up the orb spell:

    • Shadow Grip
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • ((Ability being cast) Equal to Shadow Grip LvL 1 ) or (((Ability being cast) Equal to Shadow Grip LvL 2 ) or ((Ability being cast) Equal to Shadow Grip LvL 3 ))
      • Actions
        • Countdown Timer - Start LightningTimer as a One-shot timer that will expire in 5.00 seconds
        • Camera - Shake the camera for Player 1 (Red) with magnitude 2.00
        • Set Caster = (Triggering unit)
        • Set Target = (Target unit of ability being cast)
        • Set Point = (Position of Caster)
        • Set Point2 = (Position of Target)
        • Sound - Play LoopingSound at 100.00% volume, located at Point with Z offset 0.00
        • Set LoopingSound = (Last played sound)
        • Unit - Create 1 ShadowGripDummyNEW for Player 1 (Red) at Point2 facing Default building facing degrees
        • Set ShadowGripSlowDummy = (Last created unit)
        • Unit - Add Slow (Neutral Hostile) to ShadowGripSlowDummy
        • Unit - Order ShadowGripSlowDummy to Human Sorceress - Slow Target
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Shadow Grip LvL 1 for Caster) Equal to 1
          • Then - Actions
            • Unit - Add Spell Vulnerability 1 to Target
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Shadow Grip LvL 2 for Caster) Equal to 1
          • Then - Actions
            • Unit - Add Spell Vulnerability 2 to Target
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Shadow Grip LvL 3 for Caster) Equal to 1
          • Then - Actions
            • Unit - Add Spell Vulnerability 3 to Target
          • Else - Actions
        • Special Effect - Create a special effect attached to the chest of Target using Singularity II Purple.mdx
        • Special Effect - Destroy (Last created special effect)
        • Special Effect - Create a special effect attached to the chest of Caster using Radiance Psionic.mdx
        • Set RadianceCaster = (Last created special effect)
        • Special Effect - Create a special effect attached to the chest of Target using Radiance Psionic.mdx
        • Set RadianceTarget = (Last created special effect)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Target is A flying unit) Equal to True
          • Then - Actions
            • Custom script: set udg_L2 = AddLightningEx("DRAM", true , GetLocationX(udg_Point), GetLocationY(udg_Point), GetLocationZ(udg_Point) + 70, GetLocationX(udg_Point2), GetLocationY(udg_Point2), GetLocationZ(udg_Point2) + 400)
          • Else - Actions
            • Custom script: set udg_L2 = AddLightningEx("DRAM", true , GetLocationX(udg_Point), GetLocationY(udg_Point), GetLocationZ(udg_Point) + 70, GetLocationX(udg_Point2), GetLocationY(udg_Point2), GetLocationZ(udg_Point2) + 70)
        • Custom script: call RemoveLocation (udg_Point)
        • Custom script: call RemoveLocation (udg_Point2)
        • Lightning - Change color of L2 to (1.00 0.00 1.00) with 1.00 alpha
        • Trigger - Turn on Shadow Grip Move beam <gen>
        • Trigger - Turn on Shadow Grip Damage <gen>
        • Wait 1.00 seconds
        • Unit - Remove ShadowGripSlowDummy from the game

    • Shadow Grip Move beam
      • Events
        • Time - Every 0.03 seconds of game time
      • Conditions
      • Actions
        • Set Point = (Position of Caster)
        • Set Point2 = (Position of Target)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Target is A flying unit) Equal to True
          • Then - Actions
            • Custom script: call MoveLightningEx(udg_L2, true , GetLocationX(udg_Point), GetLocationY(udg_Point), GetLocationZ(udg_Point) + 70, GetLocationX(udg_Point2), GetLocationY(udg_Point2), GetLocationZ(udg_Point2) + 200)
          • Else - Actions
            • Custom script: call MoveLightningEx(udg_L2, true , GetLocationX(udg_Point), GetLocationY(udg_Point), GetLocationZ(udg_Point) + 70, GetLocationX(udg_Point2), GetLocationY(udg_Point2), GetLocationZ(udg_Point2) + 70)
        • Custom script: call RemoveLocation(udg_Point)
        • Custom script: call RemoveLocation(udg_Point2)

    • Shadow Grip Damage
      • Events
        • Time - Every 0.50 seconds of game time
      • Conditions
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Shadow Grip LvL 1 for Caster) Equal to 1
          • Then - Actions
            • Set RandomAngle = (Random real number between 45.00 and 135.00)
            • Unit - Cause Caster to damage Target, dealing 20.00 damage of attack type Spells and damage type Magic
            • Unit - Set life of Caster to ((Life of Caster) + 10.00)
            • Set DamageLocation = (Position of Caster)
            • Floating Text - Create floating text that reads |cff00ff00+10|r at DamageLocation with Z offset 75.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
            • Custom script: call RemoveLocation(udg_DamageLocation)
            • Floating Text - Set the velocity of (Last created floating text) to 120.00 towards RandomAngle degrees
            • Floating Text - Change (Last created floating text): Disable permanence
            • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Shadow Grip LvL 2 for Caster) Equal to 1
          • Then - Actions
            • Set RandomAngle = (Random real number between 45.00 and 135.00)
            • Unit - Cause Caster to damage Target, dealing 30.00 damage of attack type Spells and damage type Magic
            • Unit - Set life of Caster to ((Life of Caster) + 15.00)
            • Set DamageLocation = (Position of Caster)
            • Floating Text - Create floating text that reads |cff00ff00+15|r at DamageLocation with Z offset 75.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
            • Custom script: call RemoveLocation(udg_DamageLocation)
            • Floating Text - Set the velocity of (Last created floating text) to 120.00 towards RandomAngle degrees
            • Floating Text - Change (Last created floating text): Disable permanence
            • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Shadow Grip LvL 3 for Caster) Equal to 1
          • Then - Actions
            • Set RandomAngle = (Random real number between 45.00 and 135.00)
            • Unit - Cause Caster to damage Target, dealing 40.00 damage of attack type Spells and damage type Magic
            • Unit - Set life of Caster to ((Life of Caster) + 20.00)
            • Set DamageLocation = (Position of Caster)
            • Floating Text - Create floating text that reads |cff00ff00+20|r at DamageLocation with Z offset 75.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
            • Custom script: call RemoveLocation(udg_DamageLocation)
            • Floating Text - Set the velocity of (Last created floating text) to 120.00 towards RandomAngle degrees
            • Floating Text - Change (Last created floating text): Disable permanence
            • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
          • Else - Actions

    • Shadow Grip Caster Target dies
      • Events
        • Unit - A unit Dies
      • Conditions
        • ((Triggering unit) Equal to Target) or ((Triggering unit) Equal to Caster)
      • Actions
        • Trigger - Turn off Shadow Grip Move beam <gen>
        • Trigger - Turn off Shadow Grip Damage <gen>
        • Lightning - Destroy L2
        • Special Effect - Destroy RadianceCaster
        • Special Effect - Destroy RadianceTarget
        • Camera - Stop swaying/shaking the camera for Player 1 (Red)
        • Sound - Destroy LoopingSound
        • Unit - Remove Spell Vulnerability 1 from Target
        • Unit - Remove Spell Vulnerability 2 from Target
        • Unit - Remove Spell Vulnerability 3 from Target
        • Set Target = No unit
        • Set Caster = No unit
        • Custom script: call RemoveLocation(udg_Point)
        • Custom script: call RemoveLocation(udg_Point2)

    • Shadow Grip Timer Expires
      • Events
        • Time - LightningTimer expires
      • Conditions
      • Actions
        • Trigger - Turn off Shadow Grip Move beam <gen>
        • Trigger - Turn off Shadow Grip Damage <gen>
        • Lightning - Destroy L2
        • Special Effect - Destroy RadianceCaster
        • Special Effect - Destroy RadianceTarget
        • Camera - Stop swaying/shaking the camera for Player 1 (Red)
        • Unit - Remove Spell Vulnerability 1 from Target
        • Unit - Remove Spell Vulnerability 2 from Target
        • Unit - Remove Spell Vulnerability 3 from Target
        • Unit - Remove Slow buff from Target
        • Sound - Destroy LoopingSound
        • Set Target = No unit
        • Set Caster = No unit
        • Custom script: call RemoveLocation(udg_Point)
        • Custom script: call RemoveLocation(udg_Point2)
     
  2. deepstrasz

    deepstrasz

    Map Reviewer

    Joined:
    Jun 4, 2009
    Messages:
    11,274
    Resources:
    1
    Maps:
    1
    Resources:
    1
    From the video it seems to me that the lightning not appearing is being overwritten by the one cast in the other spell.

    Try testing it in static mode.
    Try disabling triggers branches one by one. For instance, disable the Wheels of Darkness damage trigger (all of it).
    Also, track your triggers with game text messages.

    Wheel of Darkness Dummy Remover -> Not sure but maybe you should set a variable for any of the dummies since you use a wait and afterwards use triggering unit, not a specific/defined unit.

    Lots of triggers there.
    It could be either that some variable (lightning?) gets overwritten or a location/point removed/overwritten.

    Shadow Grip Caster Target dies
    Shouldn't this trigger also stop the timer?

    Sorry, not much of help.
     
  3. FeelsGoodMan

    FeelsGoodMan

    Joined:
    Dec 13, 2018
    Messages:
    574
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Normally I would have thought so too, but they don't use the same lightning variables and even if it's being overwritten I create the lightning variable every time I cast the orb spell so it should appear anyway.
    You mean while the orbs aren't moving? I could do that but I don't think that's the problem. It's just one variable (BH_RotateSpeed = 0.00 instead of 5.00) difference and that variable has nothing to do with lightning.
    The damage trigger shouldn't be the one causing it but if no one are able to see what's wrong then I will have to disable things one by one yes. I am reluctant to doing it as it takes around 7 minutes to save the map so disabling stuff one by one and saving every time will take hours :( In worst case scenario I will port it into a test map and do it there.
    Normally this would be required only if the spell is incomplete, but this spell is technically doing everything I want, it's just a visual bug and I have no idea what game message I can use to track this at all. I could probably convert the lightning variable to a string and post it to see if the variable changes at all.
    Yeah not sure why I am removing Triggering unit instead of their actual variables lol...
    This is the most plausible explanation but I don't understand how or why as neither of the spells uses the same variables except for TempLocation and general stuff like that.
    It turns off the damage trigger. This spell works fine for all intended purposes.
     
  4. deepstrasz

    deepstrasz

    Map Reviewer

    Joined:
    Jun 4, 2009
    Messages:
    11,274
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Doesn't the lightning move periodically? Turn off the moving triggers. See what happens. I don't know.
    P.M. me the map and let me test it.
    Start with locations/points then.
     
  5. FeelsGoodMan

    FeelsGoodMan

    Joined:
    Dec 13, 2018
    Messages:
    574
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Saving it now, give me a moment. Upload is slow as well unfortunately.
     
  6. deepstrasz

    deepstrasz

    Map Reviewer

    Joined:
    Jun 4, 2009
    Messages:
    11,274
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Ah, fork. I forgot it's over 200mb.
     
  7. FeelsGoodMan

    FeelsGoodMan

    Joined:
    Dec 13, 2018
    Messages:
    574
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Well it's closer to 160 but still large af :p
     
  8. FeelsGoodMan

    FeelsGoodMan

    Joined:
    Dec 13, 2018
    Messages:
    574
    Resources:
    2
    Maps:
    2
    Resources:
    2
    This has still not been resolved. After @deepstrasz tested the map yesterday the issue still persisted. He tried to delete all triggers except for the triggers in the spell and the lightning still disappeared.

    Today I have changed all the variables in the Shadow Grip spell, and also changed the lightning type just in case. Still happening.


    EDIT: Now it's getting really weird. I tried casting both spells simultaneously and now that the Shadow Grip lightning is a different color an interesting thing happened. It looks like it hijacks one of the orb lightnings, even though they share NONE of the same variables:vw_wtf::vw_wtf::vw_wtf:

    This is how it looks now (cleaned it up a little and changed some variables):



    Wheel of Darkness:

    • Cast Wheel of Darkness
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to Wheel of Darkness
      • Actions
        • -------- ---- --------
        • -------- Configuration --------
        • -------- ---- --------
        • Set BH_Damage = 75.00
        • Set BH_AoE = 200.00
        • Set BH_RotateSpeed = 5.00
        • Set BH_OffsetDistance = 350.00
        • Set BH_Duration = 30.01
        • Set BH_HealFrequency = 5.00
        • Set BH_HealAmount = 50.00
        • -------- ---- --------
        • -------- This only sets the mode the first time the spell is used. The mode can be changed through triggers or items another time. --------
        • -------- ---- --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Execution count of (This trigger)) Equal to 1
          • Then - Actions
            • Set Mode = True
          • Else - Actions
        • -------- ---- --------
        • -------- "BlackHoleDurationIncrease" and "MovementSpeedCloserToHero" should not both be positive values at the same time. One of them should be 0 as they are different modes. --------
        • -------- ---- --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Mode Equal to True
          • Then - Actions
            • Set BH_KillDurationIncrease = 0.00
            • Set BH_MovementSpeedCloserToHero = 0.12
          • Else - Actions
            • Set BH_KillDurationIncrease = 1.00
            • Set BH_MovementSpeedCloserToHero = 0.00
        • -------- ---- --------
        • -------- Initiate --------
        • -------- ---- --------
        • Set TempLocation = (Position of Hero)
        • If (BH_KillDurationIncrease Greater than 0.00) then do (Unit - For Hero, Ability Wheel of Darkness , Disable ability: True, Hide UI: False) else do (Do nothing)
        • Sound - Play SiphonManaLoop <gen> at 100.00% volume, attached to Hero
        • Set BlackHoleSound = (Last played sound)
        • -------- Create Dummies 1-3 --------
        • Unit - Create 1 Generic Dummy for Player 1 (Red) at TempLocation facing 0.00 degrees
        • Set BlackHoleDummy[1] = (Last created unit)
        • Unit - Create 1 Generic Dummy for Player 1 (Red) at TempLocation facing 120.00 degrees
        • Set BlackHoleDummy[2] = (Last created unit)
        • Unit - Create 1 Generic Dummy for Player 1 (Red) at TempLocation facing 240.00 degrees
        • Set BlackHoleDummy[3] = (Last created unit)
        • Set BlackHolePoint[1] = (TempLocation offset by BH_OffsetDistance towards (Facing of BlackHoleDummy[1]) degrees)
        • Set BlackHolePoint[2] = (TempLocation offset by BH_OffsetDistance towards (Facing of BlackHoleDummy[2]) degrees)
        • Set BlackHolePoint[3] = (TempLocation offset by BH_OffsetDistance towards (Facing of BlackHoleDummy[3]) degrees)
        • -------- Create Dummies 4-6 --------
        • Unit - Create 1 Black Hole for Player 1 (Red) at BlackHolePoint[1] facing 0.00 degrees
        • Set BlackHoleDummy[4] = (Last created unit)
        • Unit - Create 1 Black Hole for Player 1 (Red) at BlackHolePoint[2] facing 0.00 degrees
        • Set BlackHoleDummy[5] = (Last created unit)
        • Unit - Create 1 Black Hole for Player 1 (Red) at BlackHolePoint[3] facing 0.00 degrees
        • Set BlackHoleDummy[6] = (Last created unit)
        • -------- ---- --------
        • -------- Lightning --------
        • -------- ---- --------
        • -------- 1 --------
        • Set LP1[1] = BlackHolePoint[1]
        • Set LP1[2] = (Position of Hero)
        • Custom script: set udg_BHL[1] = AddLightningEx("DRAM", true , GetLocationX(udg_LP1[1]), GetLocationY(udg_LP1[1]), GetLocationZ(udg_LP1[1]) + 70, GetLocationX(udg_LP1[2]), GetLocationY(udg_LP1[2]), GetLocationZ(udg_LP1[2]) + 70)
        • Lightning - Change color of BHL[1] to (1.00 0.00 1.00) with 1.00 alpha
        • -------- 2 --------
        • Set LP2[1] = BlackHolePoint[2]
        • Set LP2[2] = (Position of Hero)
        • Custom script: set udg_BHL[2] = AddLightningEx("DRAM", true , GetLocationX(udg_LP2[1]), GetLocationY(udg_LP2[1]), GetLocationZ(udg_LP2[1]) + 70, GetLocationX(udg_LP2[2]), GetLocationY(udg_LP2[2]), GetLocationZ(udg_LP2[2]) + 70)
        • Lightning - Change color of BHL[2] to (1.00 0.00 1.00) with 1.00 alpha
        • -------- 3 --------
        • Set LP3[1] = BlackHolePoint[3]
        • Set LP3[2] = (Position of Hero)
        • Custom script: set udg_BHL[3] = AddLightningEx("DRAM", true , GetLocationX(udg_LP3[1]), GetLocationY(udg_LP3[1]), GetLocationZ(udg_LP3[1]) + 70, GetLocationX(udg_LP3[2]), GetLocationY(udg_LP3[2]), GetLocationZ(udg_LP3[2]) + 70)
        • Lightning - Change color of BHL[3] to (1.00 0.00 1.00) with 1.00 alpha
        • -------- ---- --------
        • -------- Periodic Stuff and Timer --------
        • -------- ---- --------
        • Trigger - Turn on Wheel of Darkness Damage <gen>
        • Trigger - Turn on Set Dummy Locations at Hero <gen>
        • Countdown Timer - Start BlackHoleTimer as a One-shot timer that will expire in BH_Duration seconds
        • Countdown Timer - Start BlackHoleHealTimer as a One-shot timer that will expire in BH_HealFrequency seconds
        • -------- ---- --------
        • -------- Remove Leaks --------
        • -------- ---- --------
        • Custom script: call RemoveLocation (udg_TempLocation)
        • Custom script: call RemoveLocation (udg_BlackHolePoint[1])
        • Custom script: call RemoveLocation (udg_BlackHolePoint[2])
        • Custom script: call RemoveLocation (udg_BlackHolePoint[3])
        • Custom script: call RemoveLocation (udg_LP1[1])
        • Custom script: call RemoveLocation (udg_LP1[2])
        • Custom script: call RemoveLocation (udg_LP2[1])
        • Custom script: call RemoveLocation (udg_LP2[2])
        • Custom script: call RemoveLocation (udg_LP3[1])
        • Custom script: call RemoveLocation (udg_LP3[2])

    • Set Dummy Locations at Hero
      • Events
        • Time - Every 0.01 seconds of game time
      • Conditions
      • Actions
        • -------- Dummy 1 --------
        • Set TempLocation = (Position of Hero)
        • Custom script: call SetUnitY(udg_BlackHoleDummy[1], GetLocationY(udg_TempLocation))
        • Custom script: call SetUnitX(udg_BlackHoleDummy[1], GetLocationX(udg_TempLocation))
        • -------- Dummy 2 --------
        • Custom script: call SetUnitY(udg_BlackHoleDummy[2], GetLocationY(udg_TempLocation))
        • Custom script: call SetUnitX(udg_BlackHoleDummy[2], GetLocationX(udg_TempLocation))
        • -------- Dummy 3 --------
        • Custom script: call SetUnitY(udg_BlackHoleDummy[3], GetLocationY(udg_TempLocation))
        • Custom script: call SetUnitX(udg_BlackHoleDummy[3], GetLocationX(udg_TempLocation))
        • -------- ---- --------
        • -------- Offset Dummies --------
        • -------- ---- --------
        • Set BlackHolePoint[1] = (TempLocation offset by (BH_OffsetDistance - BH_MovementSpeedCloserToHero) towards ((Facing of BlackHoleDummy[1]) + BH_RotateSpeed) degrees)
        • Set BlackHolePoint[2] = (TempLocation offset by (BH_OffsetDistance - BH_MovementSpeedCloserToHero) towards ((Facing of BlackHoleDummy[2]) + BH_RotateSpeed) degrees)
        • Set BlackHolePoint[3] = (TempLocation offset by (BH_OffsetDistance - BH_MovementSpeedCloserToHero) towards ((Facing of BlackHoleDummy[3]) + BH_RotateSpeed) degrees)
        • Set BH_OffsetDistance = (BH_OffsetDistance - BH_MovementSpeedCloserToHero)
        • -------- ---- --------
        • -------- Rotate Dummies --------
        • -------- ---- --------
        • Unit - Make BlackHoleDummy[1] face BlackHolePoint[1] over 0.00 seconds
        • Unit - Make BlackHoleDummy[2] face BlackHolePoint[2] over 0.00 seconds
        • Unit - Make BlackHoleDummy[3] face BlackHolePoint[3] over 0.00 seconds
        • -------- ---- --------
        • -------- Set Black Hole Location --------
        • -------- ---- --------
        • -------- Dummy 4 --------
        • Custom script: call SetUnitY(udg_BlackHoleDummy[4], GetLocationY(udg_BlackHolePoint[1]))
        • Custom script: call SetUnitX(udg_BlackHoleDummy[4], GetLocationX(udg_BlackHolePoint[1]))
        • -------- Dummy 5 --------
        • Custom script: call SetUnitY(udg_BlackHoleDummy[5], GetLocationY(udg_BlackHolePoint[2]))
        • Custom script: call SetUnitX(udg_BlackHoleDummy[5], GetLocationX(udg_BlackHolePoint[2]))
        • -------- Dummy 6 --------
        • Custom script: call SetUnitY(udg_BlackHoleDummy[6], GetLocationY(udg_BlackHolePoint[3]))
        • Custom script: call SetUnitX(udg_BlackHoleDummy[6], GetLocationX(udg_BlackHolePoint[3]))
        • -------- ---- --------
        • -------- Move Lightning --------
        • -------- ---- --------
        • -------- 1 --------
        • Set LP1[1] = BlackHolePoint[1]
        • Set LP1[2] = (Position of Hero)
        • Custom script: call MoveLightningEx(udg_BHL[1], true , GetLocationX(udg_LP1[1]), GetLocationY(udg_LP1[1]), GetLocationZ(udg_LP1[1]) + 70, GetLocationX(udg_LP1[2]), GetLocationY(udg_LP1[2]), GetLocationZ(udg_LP1[2]) + 70)
        • -------- 2 --------
        • Set LP2[1] = BlackHolePoint[2]
        • Set LP2[2] = (Position of Hero)
        • Custom script: call MoveLightningEx(udg_BHL[2], true , GetLocationX(udg_LP2[1]), GetLocationY(udg_LP2[1]), GetLocationZ(udg_LP2[1]) + 70, GetLocationX(udg_LP2[2]), GetLocationY(udg_LP2[2]), GetLocationZ(udg_LP2[2]) + 70)
        • -------- 3 --------
        • Set LP3[1] = BlackHolePoint[3]
        • Set LP3[2] = (Position of Hero)
        • Custom script: call MoveLightningEx(udg_BHL[3], true , GetLocationX(udg_LP3[1]), GetLocationY(udg_LP3[1]), GetLocationZ(udg_LP3[1]) + 70, GetLocationX(udg_LP3[2]), GetLocationY(udg_LP3[2]), GetLocationZ(udg_LP3[2]) + 70)
        • -------- ---- --------
        • -------- Clear Leaks --------
        • -------- ---- --------
        • Custom script: call RemoveLocation (udg_TempLocation)
        • Custom script: call RemoveLocation (udg_BlackHolePoint[1])
        • Custom script: call RemoveLocation (udg_BlackHolePoint[2])
        • Custom script: call RemoveLocation (udg_BlackHolePoint[3])
        • Custom script: call RemoveLocation (udg_LP1[1])
        • Custom script: call RemoveLocation (udg_LP1[2])
        • Custom script: call RemoveLocation (udg_LP2[1])
        • Custom script: call RemoveLocation (udg_LP2[2])
        • Custom script: call RemoveLocation (udg_LP3[1])
        • Custom script: call RemoveLocation (udg_LP3[2])


    Shadow Grip:
    • Shadow Grip
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • ((Ability being cast) Equal to Shadow Grip LvL 1 ) or (((Ability being cast) Equal to Shadow Grip LvL 2 ) or ((Ability being cast) Equal to Shadow Grip LvL 3 ))
      • Actions
        • -------- --- --------
        • -------- Set Variables --------
        • -------- --- --------
        • Set Caster = (Triggering unit)
        • Set Target = (Target unit of ability being cast)
        • Set SGL_Point[1] = (Position of Caster)
        • Set SGL_Point[2] = (Position of Target)
        • -------- --- --------
        • -------- Initiate --------
        • -------- --- --------
        • Countdown Timer - Start LightningTimer as a One-shot timer that will expire in 5.00 seconds
        • Camera - Shake the camera for Player 1 (Red) with magnitude 2.00
        • Unit - Create 1 ShadowGripDummyNEW for Player 1 (Red) at SGL_Point[2] facing Default building facing degrees
        • Set ShadowGripSlowDummy = (Last created unit)
        • Unit - Add Slow (Neutral Hostile) to ShadowGripSlowDummy
        • Unit - Order ShadowGripSlowDummy to Human Sorceress - Slow Target
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Shadow Grip LvL 1 for Caster) Equal to 1
          • Then - Actions
            • Unit - Add Spell Vulnerability 1 to Target
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Shadow Grip LvL 2 for Caster) Equal to 1
          • Then - Actions
            • Unit - Add Spell Vulnerability 2 to Target
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Shadow Grip LvL 3 for Caster) Equal to 1
          • Then - Actions
            • Unit - Add Spell Vulnerability 3 to Target
          • Else - Actions
        • -------- --- --------
        • -------- Sound and Special Effects --------
        • -------- --- --------
        • Sound - Play LoopingSound at 100.00% volume, located at SGL_Point[1] with Z offset 0.00
        • Set LoopingSound = (Last played sound)
        • Special Effect - Create a special effect attached to the chest of Target using Singularity II Purple.mdx
        • Special Effect - Destroy (Last created special effect)
        • Special Effect - Create a special effect attached to the chest of Caster using Radiance Psionic.mdx
        • Set RadianceCaster = (Last created special effect)
        • Special Effect - Create a special effect attached to the chest of Target using Radiance Psionic.mdx
        • Set RadianceTarget = (Last created special effect)
        • -------- --- --------
        • -------- Lightnings --------
        • -------- --- --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Target is A flying unit) Equal to True
          • Then - Actions
            • Custom script: set udg_SGL = AddLightningEx("DRAL", true , GetLocationX(udg_SGL_Point[1]), GetLocationY(udg_SGL_Point[1]), GetLocationZ(udg_SGL_Point[1]) + 70, GetLocationX(udg_SGL_Point[2]), GetLocationY(udg_SGL_Point[2]), GetLocationZ(udg_SGL_Point[2]) + 400)
          • Else - Actions
            • Custom script: set udg_SGL = AddLightningEx("DRAL", true , GetLocationX(udg_SGL_Point[1]), GetLocationY(udg_SGL_Point[1]), GetLocationZ(udg_SGL_Point[1]) + 70, GetLocationX(udg_SGL_Point[2]), GetLocationY(udg_SGL_Point[2]), GetLocationZ(udg_SGL_Point[2]) + 70)
        • Trigger - Turn on Shadow Grip Move beam <gen>
        • Trigger - Turn on Shadow Grip Damage <gen>
        • Lightning - Change color of SGL to (1.00 0.00 1.00) with 1.00 alpha
        • -------- --- --------
        • -------- Remove Leaks and Units --------
        • -------- --- --------
        • Custom script: call RemoveLocation (udg_SGL_Point[1])
        • Custom script: call RemoveLocation (udg_SGL_Point[2])
        • Wait 1.00 seconds
        • Unit - Remove ShadowGripSlowDummy from the game

    • Shadow Grip Move beam
      • Events
        • Time - Every 0.03 seconds of game time
      • Conditions
      • Actions
        • Set SGL_Point[1] = (Position of Caster)
        • Set SGL_Point[2] = (Position of Target)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Target is A flying unit) Equal to True
          • Then - Actions
            • Custom script: call MoveLightningEx(udg_SGL, true , GetLocationX(udg_SGL_Point[1]), GetLocationY(udg_SGL_Point[1]), GetLocationZ(udg_SGL_Point[1]) + 70, GetLocationX(udg_SGL_Point[2]), GetLocationY(udg_SGL_Point[2]), GetLocationZ(udg_SGL_Point[2]) + 200)
          • Else - Actions
            • Custom script: call MoveLightningEx(udg_SGL, true , GetLocationX(udg_SGL_Point[1]), GetLocationY(udg_SGL_Point[1]), GetLocationZ(udg_SGL_Point[1]) + 70, GetLocationX(udg_SGL_Point[2]), GetLocationY(udg_SGL_Point[2]), GetLocationZ(udg_SGL_Point[2]) + 70)
        • Custom script: call RemoveLocation (udg_SGL_Point[1])
        • Custom script: call RemoveLocation (udg_SGL_Point[2])



    Video of how it looks with different lightnings:
     
    Last edited: Nov 8, 2019
  9. deepstrasz

    deepstrasz

    Map Reviewer

    Joined:
    Jun 4, 2009
    Messages:
    11,274
    Resources:
    1
    Maps:
    1
    Resources:
    1
    That didn't happen to me. If you use totally different variables and locations, then it might be the lightning.
     
  10. FeelsGoodMan

    FeelsGoodMan

    Joined:
    Dec 13, 2018
    Messages:
    574
    Resources:
    2
    Maps:
    2
    Resources:
    2
    It happened, you just didn't see it because the lightning was the same color. Or at least so I believe.

    And yes I am using completely different variables and lightnings now.
     
  11. FeelsGoodMan

    FeelsGoodMan

    Joined:
    Dec 13, 2018
    Messages:
    574
    Resources:
    2
    Maps:
    2
    Resources:
    2
    After a lot of help with testing from @deepstrasz we have managed to solve it. It makes no sense to me WHY it was bugged, or why it was fixed by the changes I made but here's our observations:

    Deepstrasz reported that the issue was fixed by making sure the "Shadow Grip Timer Expires" trigger doesn't fire after the target has died (after the "Shadow Grip Target/Castger Dies" trigger has fired).
    Around the same time as Deepstrasz reported that, I also tried using a "Wait" instead of a "Start timer as.." trigger to run the "Shadow Grip Timer Expires" which ALSO fixed the issue.

    This is all well and good, but I am still left with not knowing exactly why the two spells interfered when the ONLY thing they had in common was simply that they were both using some kind of lightning. They were both also using a periodic trigger but none of the same variables so it shouldn't matter.

    For anyone wanting to know, here's what I changed:


    • Shadow Grip
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • ((Ability being cast) Equal to Shadow Grip LvL 1 ) or (((Ability being cast) Equal to Shadow Grip LvL 2 ) or ((Ability being cast) Equal to Shadow Grip LvL 3 ))
      • Actions
        • -------- --- --------
        • -------- Set Variables --------
        • -------- --- --------
        • Set Caster = (Triggering unit)
        • Set Target = (Target unit of ability being cast)
        • Set SGL_Point[1] = (Position of Caster)
        • Set SGL_Point[2] = (Position of Target)
        • -------- --- --------
        • -------- Initiate --------
        • -------- --- --------
        • Countdown Timer - Start LightningTimer as a One-shot timer that will expire in 5.00 seconds
        • Camera - Shake the camera for Player 1 (Red) with magnitude 2.00
        • Unit - Create 1 ShadowGripDummyNEW for Player 1 (Red) at SGL_Point[2] facing Default building facing degrees
        • Set ShadowGripSlowDummy = (Last created unit)
        • Unit - Add Slow (Neutral Hostile) to ShadowGripSlowDummy
        • Unit - Order ShadowGripSlowDummy to Human Sorceress - Slow Target
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Shadow Grip LvL 1 for Caster) Equal to 1
          • Then - Actions
            • Unit - Add Spell Vulnerability 1 to Target
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Shadow Grip LvL 2 for Caster) Equal to 1
          • Then - Actions
            • Unit - Add Spell Vulnerability 2 to Target
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Shadow Grip LvL 3 for Caster) Equal to 1
          • Then - Actions
            • Unit - Add Spell Vulnerability 3 to Target
          • Else - Actions
        • -------- --- --------
        • -------- Sound and Special Effects --------
        • -------- --- --------
        • Sound - Play LoopingSound at 100.00% volume, located at SGL_Point[1] with Z offset 0.00
        • Set LoopingSound = (Last played sound)
        • Special Effect - Create a special effect attached to the chest of Target using Singularity II Purple.mdx
        • Special Effect - Destroy (Last created special effect)
        • Special Effect - Create a special effect attached to the chest of Caster using Radiance Psionic.mdx
        • Set RadianceCaster = (Last created special effect)
        • Special Effect - Create a special effect attached to the chest of Target using Radiance Psionic.mdx
        • Set RadianceTarget = (Last created special effect)
        • -------- --- --------
        • -------- Lightnings --------
        • -------- --- --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Target is A flying unit) Equal to True
          • Then - Actions
            • Custom script: set udg_SGL = AddLightningEx("DRAL", true , GetLocationX(udg_SGL_Point[1]), GetLocationY(udg_SGL_Point[1]), GetLocationZ(udg_SGL_Point[1]) + 70, GetLocationX(udg_SGL_Point[2]), GetLocationY(udg_SGL_Point[2]), GetLocationZ(udg_SGL_Point[2]) + 400)
          • Else - Actions
            • Custom script: set udg_SGL = AddLightningEx("DRAL", true , GetLocationX(udg_SGL_Point[1]), GetLocationY(udg_SGL_Point[1]), GetLocationZ(udg_SGL_Point[1]) + 70, GetLocationX(udg_SGL_Point[2]), GetLocationY(udg_SGL_Point[2]), GetLocationZ(udg_SGL_Point[2]) + 70)
        • Trigger - Turn on Shadow Grip Move beam <gen>
        • Trigger - Turn on Shadow Grip Damage <gen>
        • Lightning - Change color of SGL to (1.00 0.00 1.00) with 1.00 alpha
        • -------- --- --------
        • -------- Remove Leaks and Units --------
        • -------- --- --------
        • Custom script: call RemoveLocation (udg_SGL_Point[1])
        • Custom script: call RemoveLocation (udg_SGL_Point[2])
        • Wait 1.00 seconds
        • Unit - Remove ShadowGripSlowDummy from the game
    • Shadow Grip Timer Expires
      • Events
        • Time - LightningTimer expires
      • Conditions
      • Actions
        • Trigger - Turn off Shadow Grip Move beam <gen>
        • Trigger - Turn off Shadow Grip Damage <gen>
        • Lightning - Destroy L2
        • Special Effect - Destroy RadianceCaster
        • Special Effect - Destroy RadianceTarget
        • Camera - Stop swaying/shaking the camera for Player 1 (Red)
        • Unit - Remove Spell Vulnerability 1 from Target
        • Unit - Remove Spell Vulnerability 2 from Target
        • Unit - Remove Spell Vulnerability 3 from Target
        • Unit - Remove Slow buff from Target
        • Sound - Destroy LoopingSound
        • Set Target = No unit
        • Set Caster = No unit
        • Custom script: call RemoveLocation(udg_Point)
        • Custom script: call RemoveLocation(udg_Point2)


    To this instead:

    • Shadow Grip
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • ((Ability being cast) Equal to Shadow Grip LvL 1 ) or (((Ability being cast) Equal to Shadow Grip LvL 2 ) or ((Ability being cast) Equal to Shadow Grip LvL 3 ))
      • Actions
        • -------- --- --------
        • -------- Set Variables --------
        • -------- --- --------
        • Set Caster = (Triggering unit)
        • Set Target = (Target unit of ability being cast)
        • Set SGL_Point[1] = (Position of Caster)
        • Set SGL_Point[2] = (Position of Target)
        • -------- --- --------
        • -------- Initiate --------
        • -------- --- --------
        • Camera - Shake the camera for Player 1 (Red) with magnitude 2.00
        • Unit - Create 1 ShadowGripDummyNEW for Player 1 (Red) at SGL_Point[2] facing Default building facing degrees
        • Set ShadowGripSlowDummy = (Last created unit)
        • Unit - Add Slow (Neutral Hostile) to ShadowGripSlowDummy
        • Unit - Order ShadowGripSlowDummy to Human Sorceress - Slow Target
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Shadow Grip LvL 1 for Caster) Equal to 1
          • Then - Actions
            • Unit - Add Spell Vulnerability 1 to Target
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Shadow Grip LvL 2 for Caster) Equal to 1
          • Then - Actions
            • Unit - Add Spell Vulnerability 2 to Target
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Shadow Grip LvL 3 for Caster) Equal to 1
          • Then - Actions
            • Unit - Add Spell Vulnerability 3 to Target
          • Else - Actions
        • -------- --- --------
        • -------- Sound and Special Effects --------
        • -------- --- --------
        • Sound - Play LoopingSound at 100.00% volume, located at SGL_Point[1] with Z offset 0.00
        • Set LoopingSound = (Last played sound)
        • Special Effect - Create a special effect attached to the chest of Target using Singularity II Purple.mdx
        • Special Effect - Destroy (Last created special effect)
        • Special Effect - Create a special effect attached to the chest of Caster using Radiance Psionic.mdx
        • Set RadianceCaster = (Last created special effect)
        • Special Effect - Create a special effect attached to the chest of Target using Radiance Psionic.mdx
        • Set RadianceTarget = (Last created special effect)
        • -------- --- --------
        • -------- Lightnings --------
        • -------- --- --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Target is A flying unit) Equal to True
          • Then - Actions
            • Custom script: set udg_SGL = AddLightningEx("DRAL", true , GetLocationX(udg_SGL_Point[1]), GetLocationY(udg_SGL_Point[1]), GetLocationZ(udg_SGL_Point[1]) + 70, GetLocationX(udg_SGL_Point[2]), GetLocationY(udg_SGL_Point[2]), GetLocationZ(udg_SGL_Point[2]) + 400)
          • Else - Actions
            • Custom script: set udg_SGL = AddLightningEx("DRAL", true , GetLocationX(udg_SGL_Point[1]), GetLocationY(udg_SGL_Point[1]), GetLocationZ(udg_SGL_Point[1]) + 70, GetLocationX(udg_SGL_Point[2]), GetLocationY(udg_SGL_Point[2]), GetLocationZ(udg_SGL_Point[2]) + 70)
        • Trigger - Turn on Shadow Grip Move beam <gen>
        • Trigger - Turn on Shadow Grip Damage <gen>
        • Trigger - Turn on Shadow Grip Caster Target dies <gen>
        • Lightning - Change color of SGL to (1.00 0.00 1.00) with 1.00 alpha
        • -------- --- --------
        • -------- Remove Leaks and Units --------
        • -------- --- --------
        • Custom script: call RemoveLocation (udg_SGL_Point[1])
        • Custom script: call RemoveLocation (udg_SGL_Point[2])
        • Wait 1.00 seconds
        • Unit - Remove ShadowGripSlowDummy from the game
        • Wait 4.00 seconds
        • Trigger - Run Shadow Grip Timer Expires <gen> (ignoring conditions)
    • Shadow Grip Timer Expires
      • Events
      • Conditions
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Target is alive) Equal to True
          • Then - Actions
            • Trigger - Turn off Shadow Grip Move beam <gen>
            • Trigger - Turn off Shadow Grip Damage <gen>
            • Special Effect - Destroy RadianceCaster
            • Special Effect - Destroy RadianceTarget
            • Camera - Stop swaying/shaking the camera for Player 1 (Red)
            • Unit - Remove Spell Vulnerability 1 from Target
            • Unit - Remove Spell Vulnerability 2 from Target
            • Unit - Remove Spell Vulnerability 3 from Target
            • Unit - Remove Slow buff from Target
            • Sound - Destroy LoopingSound
            • Custom script: call RemoveLocation (udg_SGL_Point[1])
            • Custom script: call RemoveLocation (udg_SGL_Point[2])
            • Lightning - Destroy SGL
          • Else - Actions
            • Trigger - Turn off Shadow Grip Caster Target dies <gen>