Spell Light Dome

Ivach

New Member
Reaction score
18
Light Dome​
Channels immense light energy for 3 seconds, releasing it onto an area in the form of a dome. The dome damages all enemy units inside it and provides huge bonus armor and hp regeneration to friendly units. Friendly units can enter and exit the dome at will. Enemy units inside cannot leave, while the enemies outside may not enter. Lasts for 10 seconds.

Level 1 - 30 damage per second. 50 bonus armor and hp regeneration.
Level 2 - 45 damage per second. 70 bonus armor and hp regeneration.
Level 3 - 60 damage per second. 90 bonus armor and hp regeneration.

Information
GUI
Not MUI
Leakless (As far as I know)
Lagless​

Something that I decided to whip up after not making spells for about a few months. So the code is rather messy and unprofessional. Also, spell is not MUI.

Screenshots
P.S. Its much better to view the spell in game. The screenshots doesn't really do the spell any justice.​
lightdome2.png

lightdome1.png
Code
Trigger:
  • Initialisation
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Light Dome
    • Actions
      • Set LD_Cast = 0
      • Set LD_Duration = 0
      • Set LD_CastPoint = (Target point of ability being cast)
      • Set LD_Caster = (Triggering unit)
      • Countdown Timer - Start LD_CastTimer as a Repeating timer that will expire in 1.00 seconds

Trigger:
  • Cast Countdown
    • Events
      • Time - LD_CastTimer expires
    • Conditions
    • Actions
      • Set LD_Cast = (LD_Cast + 1)
      • Animation - Change LD_Caster's animation speed to 8.00% of its original speed
      • Special Effect - Create a special effect attached to the chest of LD_Caster using Abilities\Weapons\FaerieDragonMissile\FaerieDragonMissile.mdl
      • Special Effect - Destroy (Last created special effect)
      • For each (Integer A) from 1 to 36, do (Actions)
        • Loop - Actions
          • Set LD_BeamPositions = (LD_CastPoint offset by 400.00 towards LD_CastEffectAngle degrees)
          • Special Effect - Create a special effect at LD_BeamPositions using Abilities\Weapons\ProcMissile\ProcMissile.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set LD_CastEffectAngle = (LD_CastEffectAngle + 10.00)
      • Custom script: call RemoveLocation (udg_LD_BeamPositions)

Trigger:
  • Spell Effects
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Light Dome
    • Actions
      • Set LD_OutsideGroup = (Units within 200000.00 of LD_CastPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of LD_Caster)) Equal to True))))
      • Unit Group - Pick every unit in LD_OutsideGroup and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to LD_OutDome
      • Custom script: call DestroyGroup (udg_LD_OutsideGroup)
      • Set LD_InsideGroup = (Units within 350.00 of LD_CastPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of LD_Caster)) Equal to True))))
      • Unit Group - Pick every unit in LD_InsideGroup and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to LD_InDome
      • Custom script: call DestroyGroup (udg_LD_InsideGroup)
      • Unit Group - Remove all units of LD_InDome from LD_OutDome
      • Set LD_CastEffectAngle = 0.00
      • Countdown Timer - Pause LD_CastTimer
      • Animation - Change LD_Caster's animation speed to 100.00% of its original speed
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • LD_Cast Equal to 3
        • Then - Actions
          • Trigger - Turn on Beams <gen>
          • Countdown Timer - Start LD_Timer as a One-shot timer that will expire in 1.20 seconds
          • For each (Integer A) from 1 to 18, do (Actions)
            • Loop - Actions
              • Set LD_BeamPositions = (LD_CastPoint offset by 400.00 towards LD_CastEffectAngle degrees)
              • Unit - Create 1 Light Beam for (Owner of LD_Caster) at LD_BeamPositions facing Default building facing degrees
              • Unit - Add a 10.40 second Generic expiration timer to (Last created unit)
              • Unit Group - Add (Last created unit) to LD_Beams
              • Set LD_CastEffectAngle = (LD_CastEffectAngle + (360.00 / 18.00))
          • Custom script: call RemoveLocation (udg_LD_BeamPositions)
        • Else - Actions

Trigger:
  • Effect Cleanup
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Light Dome
    • Actions
      • Animation - Change LD_Dome's animation speed to 100.00% of its original speed
      • Unit Group - Pick every unit in LD_Beams and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed

Trigger:
  • Beams
    • Events
      • Time - LD_Timer expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in LD_Beams and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
      • Unit - Create 1 Light Dome for (Owner of LD_Caster) at LD_CastPoint facing Default building facing degrees
      • Set LD_Dome = (Last created unit)
      • Unit - Set level of Armor Bonus for LD_Dome to (Level of Light Dome for LD_Caster)
      • Unit - Add a 10.00 second Generic expiration timer to LD_Dome
      • Unit - Add Crow Form to LD_Dome
      • Animation - Change LD_Dome flying height to 450.00 at 0.00
      • Unit - Remove Crow Form from LD_Dome
      • Trigger - Turn on Effects <gen>
      • Trigger - Turn on Dome Blocking <gen>
      • Trigger - Run Dome <gen> (ignoring conditions)

Trigger:
  • Dome
    • Events
    • Conditions
    • Actions
      • Wait 0.40 seconds
      • Animation - Change LD_Dome's animation speed to 0.00% of its original speed

Trigger:
  • Effects
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set LD_Duration = (LD_Duration + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • LD_Duration Greater than or equal to 11
        • Then - Actions
          • Unit Group - Remove all units of LD_InDome from LD_InDome
          • Unit Group - Remove all units of LD_OutDome from LD_OutDome
          • Trigger - Turn off (This trigger)
          • Trigger - Turn off Dome Blocking <gen>
          • Custom script: call RemoveLocation (udg_LD_CastPoint)
        • Else - Actions
          • Set LD_HealAndDamageGroup = (Units within 400.00 of LD_CastPoint matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)))
          • Unit Group - Pick every unit in LD_HealAndDamageGroup 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 ally of (Owner of LD_Caster)) Equal to True
                • Then - Actions
                  • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (30.00 + (20.00 x (Real((Level of Light Dome for LD_Caster))))))
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) belongs to an ally of (Owner of LD_Caster)) Equal to False
                    • Then - Actions
                      • Unit - Cause LD_Caster to damage (Picked unit), dealing (15.00 + (15.00 x (Real((Level of Light Dome for LD_Caster))))) damage of attack type Spells and damage type Normal
                    • Else - Actions
          • Custom script: call DestroyGroup (udg_LD_HealAndDamageGroup)

Trigger:
  • Dome Blocking
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in LD_InDome and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between (Position of (Picked unit)) and LD_CastPoint) Greater than or equal to 350.00
            • Then - Actions
              • Set LD_TempPoint = (LD_CastPoint offset by 345.00 towards (Angle from LD_CastPoint to (Position of (Picked unit))) degrees)
              • Unit - Move (Picked unit) instantly to LD_TempPoint
            • Else - Actions
      • Custom script: call RemoveLocation (udg_LD_TempPoint)
      • Unit Group - Pick every unit in LD_OutDome and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between (Position of (Picked unit)) and LD_CastPoint) Less than or equal to 500.00
            • Then - Actions
              • Set LD_TempPoint = (LD_CastPoint offset by 505.00 towards (Angle from LD_CastPoint to (Position of (Picked unit))) degrees)
              • Unit - Move (Picked unit) instantly to (LD_CastPoint offset by 505.00 towards (Angle from LD_CastPoint to (Position of (Picked unit))) degrees)
            • Else - Actions
      • Custom script: call RemoveLocation (udg_LD_TempPoint)
 

Attachments

  • Light Dome.w3x
    35.3 KB · Views: 262

Komaqtion

You can change this now in User CP.
Reaction score
469
This leaks like he%% !
You really need to clean up all of those leaks !

And also, this isn't the least amount of MUI, try to make it so ;)
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Trigger:
  • Set LD_OutsideGroup = (Units within 200000.00 of LD_CastPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of LD_Caster)) Equal to True))))
    • Unit Group - Pick every unit in LD_OutsideGroup and do (Actions)
      • Loop - Actions
        • Unit Group - Add (Picked unit) to LD_OutDome

Why set a group just to set another group?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
That's just because he might not want to overwrite the old group with the new units, just merge them together ;)
 

Ivach

New Member
Reaction score
18
Missed the leaks in the last trigger. Fixed. Any other parts of the trigger that is still leaking?

I might make it MUI in the near future, but for now, I'll just leave it as it is.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
In the second and third trigger, this line should be inside the loop:
Trigger:
  • Custom script: call RemoveLocation (udg_LD_BeamPositions)


In your seventh trigger, you should just remove this "Else If":
Trigger:
  • ((Picked unit) belongs to an ally of (Owner of LD_Caster)) Equal to False


And just use the "Else" field ;)

In the eigth trigger, there are two leaks:
Trigger:
  • (Distance between (Position of (Picked unit)) and LD_CastPoint) Greater than or equal to 350.00


And you should also move these lines into the "If", and not have them outside it ;)
Trigger:
  • Custom script: call RemoveLocation (udg_LD_TempPoint)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top