1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. 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
  3. 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
  4. 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
  5. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  6. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  7. The results are out! Check them out.
    Dismiss Notice
  8. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  9. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  10. 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.

Electric Web V1.02

Submitted by Tank-Commander
This bundle is marked as approved. It works and satisfies the submission rules.
Took a break from doing very long toop triggered spells and wanted to give the moderators something easy to moderate - so I made this basic one =3

It's a passive Unit Ability, levelled rather than by the ability levelling up but a research instead (considering the functionality it only makes sense to do it this way)

Tooltip

Passive spell, Automatically electrically connects to other units with the same ability, any unit which moves into the lightning effect will recieve constant heavy damage.


Features

- Heavily Configurable
- Simple
- Pretty
- Unique


Triggers

  • Electric Web Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Do not touch --------
      • Hashtable - Create a hashtable
      • Set EW_Hash = (Last created hashtable)
      • -------- ---------- --------
      • -------- Sets the tolerance of the Lightning --------
      • Set EW_Tolerance = 15.00
      • -------- Sets the AOE of the damage of the Web connections --------
      • Set EW_AOEBase = 300.00
      • Set EW_AOEPerLevel = 0.00
      • -------- Sets the damage per second of the web --------
      • Set EW_DamageBase = 0.50
      • Set EW_DamagePerLevel = 0.25
      • -------- Sets the type of lightning --------
      • Set EW_LightningEffect = CLPB
      • -------- Sets the colouration of the lightning effects --------
      • Set EW_LightningColours[1] = 1.00
      • Set EW_LightningColours[2] = 0.25
      • Set EW_LightningColours[3] = 0.00
      • -------- Sets how high the lightning effect will be --------
      • Set EW_LightningHeight = 75.00
      • -------- ---------- --------
      • -------- Sets the Spell --------
      • Set EW_Spell = Electric Web
      • -------- Sets the research to upgrade the spell --------
      • Set EW_Research = Electrical Generators
      • -------- Startup --------
      • Set EW_TempGroup = (Units in (Playable map area) matching ((Level of EW_Spell for (Matching unit)) Greater than 0))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in EW_TempGroup) Greater than 0
        • Then - Actions
          • Trigger - Turn on Electric Web Loop <gen>
          • Unit Group - Pick every unit in EW_TempGroup and do (Actions)
            • Loop - Actions
              • Unit Group - Add (Picked unit) to EW_ElectricWebGroup
        • Else - Actions
      • Custom script: call DestroyGroup (udg_EW_TempGroup)

  • Electric Web Activation
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set EW_TempGroup = (Units in (Playable map area) matching ((((Matching unit) is in EW_ElectricWebGroup) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((Level of EW_Spell for (Matching unit)) Greater than 0))))
      • Unit Group - Pick every unit in EW_TempGroup and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to EW_ElectricWebGroup
          • -------- Adds new units to the unit group --------
      • If ((Number of units in EW_TempGroup) Greater than 0) then do (Trigger - Turn on Electric Web Loop <gen>) else do (Do nothing)
      • Custom script: call DestroyGroup (udg_EW_TempGroup)

  • Electric Web Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in EW_ElectricWebGroup and do (Actions)
        • Loop - Actions
          • Set EW_U = (Picked unit)
          • Custom script: set udg_EW_UHandle = GetHandleId(udg_EW_U)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (EW_U is dead) Equal to True
            • Then - Actions
              • -------- Unit cleanup --------
              • For each (Integer EW_i) from 1 to (Load 0 of EW_UHandle from EW_Hash), do (Actions)
                • Loop - Actions
                  • Lightning - Destroy (Load EW_i of EW_UHandle in EW_Hash)
              • Unit Group - Remove EW_U from EW_ElectricWebGroup
              • Hashtable - Clear all child hashtables of child EW_UHandle in (Last created hashtable)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in EW_ElectricWebGroup) Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
              • -------- Unit setup --------
              • Set EW_TempPoint = (Position of EW_U)
              • Set EW_TempReal[1] = (Real((Current research level of EW_Research for (Owner of EW_U))))
              • Set EW_TempReal[2] = (EW_AOEBase + (EW_AOEPerLevel x EW_TempReal[1]))
              • -------- Lightning Clean up --------
              • For each (Integer EW_i) from 1 to (Load 0 of EW_UHandle from EW_Hash), do (Actions)
                • Loop - Actions
                  • Lightning - Destroy (Load EW_i of EW_UHandle in EW_Hash)
              • Set EW_i = 0
              • Set EW_TempGroup = (Units within EW_TempReal[2] of EW_TempPoint)
              • -------- Electricity --------
              • Unit Group - Pick every unit in EW_TempGroup and do (Actions)
                • Loop - Actions
                  • -------- Finding Targets --------
                  • Set EW_TempU = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (EW_TempU belongs to an enemy of (Owner of EW_U)) Equal to False
                      • (EW_TempU is in EW_ElectricWebGroup) Equal to True
                      • EW_TempU Not equal to EW_U
                    • Then - Actions
                      • -------- Lightning Effects --------
                      • Set EW_i = (EW_i + 1)
                      • Set EW_TempPoint2 = (Position of EW_TempU)
                      • Custom script: set udg_EW_TempZ = GetLocationZ (udg_EW_TempPoint) + udg_EW_LightningHeight
                      • Custom script: set udg_EW_TempZ2 = GetLocationZ (udg_EW_TempPoint2) + udg_EW_LightningHeight
                      • Custom script: set udg_EW_TempLightning = AddLightningEx(udg_EW_LightningEffect , true, GetLocationX(udg_EW_TempPoint), GetLocationY(udg_EW_TempPoint), udg_EW_TempZ, GetLocationX(udg_EW_TempPoint2), GetLocationY(udg_EW_TempPoint2), udg_EW_TempZ2)
                      • Custom script: call RemoveLocation (udg_EW_TempPoint2)
                      • Lightning - Change color of EW_TempLightning to (EW_LightningColours[1] EW_LightningColours[2] EW_LightningColours[3]) with 1.00 alpha
                      • Hashtable - Save Handle OfEW_TempLightning as EW_i of EW_UHandle in EW_Hash
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (EW_TempU is Magic Immune) Equal to False
                      • ((Unit-type of EW_TempU) is A structure) Equal to False
                      • (EW_TempU is A ground unit) Equal to True
                      • (EW_TempU is alive) Equal to True
                      • (EW_TempU belongs to an enemy of (Owner of EW_U)) Equal to True
                      • (EW_TempU is in EW_ElectricWebGroup) Equal to False
                    • Then - Actions
                      • -------- Location Checking --------
                      • Set EW_TempPoint2 = (Position of EW_TempU)
                      • Set EW_TempReal[3] = (Distance between EW_TempPoint and EW_TempPoint2)
                      • Set EW_Angle = (Angle from EW_TempPoint to EW_TempPoint2)
                      • Set EW_TempGroup2 = (Units within EW_TempReal[2] of EW_TempPoint matching ((((Matching unit) is in EW_ElectricWebGroup) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of EW_U)) Equal to False)))
                      • Unit Group - Pick every unit in EW_TempGroup2 and do (Actions)
                        • Loop - Actions
                          • -------- Checking the target is inbetween two Lightnings --------
                          • Set EW_TempU2 = (Picked unit)
                          • Set EW_TempPoint3 = (Position of EW_TempU2)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Distance between EW_TempPoint and EW_TempPoint3) Greater than EW_TempReal[3]
                              • (Angle from EW_TempPoint to EW_TempPoint3) Less than or equal to (EW_Angle + EW_Tolerance)
                              • (Angle from EW_TempPoint to EW_TempPoint3) Greater than or equal to (EW_Angle - EW_Tolerance)
                            • Then - Actions
                              • Unit - Cause EW_U to damage EW_TempU, dealing (EW_DamageBase + (EW_DamagePerLevel x EW_TempReal[1])) damage of attack type Spells and damage type Normal
                            • Else - Actions
                          • Custom script: call RemoveLocation (udg_EW_TempPoint3)
                      • -------- Cleanup --------
                      • Custom script: call DestroyGroup (udg_EW_TempGroup2)
                      • Custom script: call RemoveLocation (udg_EW_TempPoint2)
                    • Else - Actions
              • -------- Cleanup --------
              • Hashtable - Save EW_i as 0 of EW_UHandle in EW_Hash
              • Custom script: call DestroyGroup (udg_EW_TempGroup)
              • Custom script: call RemoveLocation (udg_EW_TempPoint)



Changelog

-=V1.00=-
- Initial Upload
- Expect errors
-=V1.01=-
- Modified Z Offset for lightning calculation
-=V1.02=-
- Changed unit target selection
- Changed the activation trigger so revived units are re-added


Enjoy and give credits if you use =3

Keywords:
Electric, Spider, Bug, Web, Chain, Link, Zap, Buzz, Group, Electrical, Electricity.
Contents

Electric Web (Map)

Reviews
Moderator
Interesting concept. Works well but this could be more efficient and lighter on your computer Suggested changes Don't create double lightnings. If you have units A and B, only create from A to B or B to A. Not A to B and B to A Use...
  1. Reviewed by Maker, Electric Web V1.02, 2nd Apr 2012

    Interesting concept. Works well but this could be more efficient and lighter on your computer
    Suggested changes
    • Don't create double lightnings. If you have units A and B, only create
      from A to B or B to A. Not A to B and B to A
    • Use MoveLightningEx instead of creating/destroying lightnings all the time
    • Don't use a 0.03 periodic trigger for the activation


    Old reviews

    Reviewed by Maker, Electric Web V1.01, 17th Feb 2012

    Required changes
    • In finding targets, you need to use
      • (Picked unit) Not equal to EW_U
    • Don't create double lightnings. If you have units A and B, only create
      from A to B or B to A. Not A to B and B to A
    • Use MoveLightningEx instead of creating/destroying lightnings all the time
    • Units that are revived can no longer use the ability


    20:48, 13th Mar 2012
    Pharaoh_: Very interesting. Count GetLocationZ() as a height parameter for the lightnings. Save the source of lightning unit to the sub-unit (which "receives" the lightning) and check the distance between these and then destroy the lightnings, otherwise, it's pretty heavy, creating and destroying the lightnings all the time.
     
  2. Tank-Commander

    Tank-Commander

    Spell Reviewer

    Joined:
    May 26, 2009
    Messages:
    1,543
    Resources:
    44
    Packs:
    1
    Spells:
    41
    Tutorials:
    2
    Resources:
    44
    Subbing =3
     
  3. Kam

    Kam

    Joined:
    Aug 3, 2004
    Messages:
    2,625
    Resources:
    23
    Models:
    8
    Icons:
    2
    Maps:
    13
    Resources:
    23
    This is great. The eye candy is perfect.
     
  4. zv27

    zv27

    Joined:
    Aug 21, 2010
    Messages:
    296
    Resources:
    0
    Resources:
    0
    true

    Spell: Excellent 5/5 + rep

    Coding Very Good 4/5
     
  5. Jay the Editor

    Jay the Editor

    Joined:
    Aug 12, 2008
    Messages:
    317
    Resources:
    6
    Icons:
    2
    Spells:
    4
    Resources:
    6
    Wow. Epic! 5/5!
    • ------- Sets the damage per second of the web --------
    Isn't that the damage is per every 0.03 seconds? :p Just checking by triggers. Haven't test it yet but I love da idea :D
     
  6. Lautanen

    Lautanen

    Joined:
    Dec 8, 2009
    Messages:
    94
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Sure:
    If damage base is 0.50, it will do (1.00 for second / 0.03 is loop) 0.50*3.33 = 1.66 damage per sec. That is more sensible than 0.5 damage per second.

    About the spell, its good and would be nice upgrade for human (since they are so hi-tech dudes with their "I see everything" towers, so unfair to shades).
     
  7. Marsal

    Marsal

    Joined:
    Jun 24, 2009
    Messages:
    1,345
    Resources:
    15
    Maps:
    1
    Spells:
    14
    Resources:
    15
    You should make the spider face to the center. Btw. It still looks pretty nice.
     
  8. Tank-Commander

    Tank-Commander

    Spell Reviewer

    Joined:
    May 26, 2009
    Messages:
    1,543
    Resources:
    44
    Packs:
    1
    Spells:
    41
    Tutorials:
    2
    Resources:
    44
    Spider face the center? whut? This is a system connecting all units with the ability, not summoning 3 electric spiders XD
     
  9. Marsal

    Marsal

    Joined:
    Jun 24, 2009
    Messages:
    1,345
    Resources:
    15
    Maps:
    1
    Spells:
    14
    Resources:
    15
    Woah. Close enough ~.~
     
  10. Magtheridon96

    Magtheridon96

    Joined:
    Dec 12, 2008
    Messages:
    6,006
    Resources:
    26
    Maps:
    1
    Spells:
    8
    Tutorials:
    7
    JASS:
    10
    Resources:
    26
    This spell sucks
    -9001/5
    -INFINITE REP!!111!11ONEONEONoneoneoneeleven
     
  11. Its Ryan Boi

    Its Ryan Boi

    Joined:
    Jul 21, 2010
    Messages:
    811
    Resources:
    2
    Icons:
    2
    Resources:
    2
    April fools does not work at 6:00 PM Meg >_>
     
  12. azog

    azog

    Joined:
    May 23, 2013
    Messages:
    1
    Resources:
    0
    Resources:
    0
    very nice, beautiful spell, I can think of a thousand ways to use it, which saddens me,
    because if I import it (I believe I did it right 95 %) and place 4+ units to be connected,
    w3.exe starts consuming 50% of the CPU and the PC goes unbelievably(and unplayably) slow... anyway around that ? the same happens when I increase the range or dmg...thanks for advice
     
  13. Tank-Commander

    Tank-Commander

    Spell Reviewer

    Joined:
    May 26, 2009
    Messages:
    1,543
    Resources:
    44
    Packs:
    1
    Spells:
    41
    Tutorials:
    2
    Resources:
    44
    Increasing the damage shouldn't change anything
    Increasing the range shouldn't -really- change anything

    I've successfully managed to hook up 40 units without lag, so I'm not sure why you'd have issues assuming everything was imported correctly.

    though, there is a way I could make this much better (as maker suggested) which would probably fix tat, may do that sometime.
     
  14. Magtheridon96

    Magtheridon96

    Joined:
    Dec 12, 2008
    Messages:
    6,006
    Resources:
    26
    Maps:
    1
    Spells:
    8
    Tutorials:
    7
    JASS:
    10
    Resources:
    26
    I was being serious at the time :3
     
  15. necrox22

    necrox22

    Joined:
    Sep 21, 2012
    Messages:
    2
    Resources:
    0
    Resources:
    0
    You fuck spell arruined my map.

    Unable to load file
    level info data missing or invalid

    1 year in this map and u fuk skill.................
     
  16. necrox22

    necrox22

    Joined:
    Sep 21, 2012
    Messages:
    2
    Resources:
    0
    Resources:
    0
    that shit................

    i hate u
     
  17. Tank-Commander

    Tank-Commander

    Spell Reviewer

    Joined:
    May 26, 2009
    Messages:
    1,543
    Resources:
    44
    Packs:
    1
    Spells:
    41
    Tutorials:
    2
    Resources:
    44
    Are you running the latest version of the editor? - You're the first person to ever have such a problem that I'm aware of (given this old spell is in GUI it isn't exactly liable to break any maps)
     
  18. Kam

    Kam

    Joined:
    Aug 3, 2004
    Messages:
    2,625
    Resources:
    23
    Models:
    8
    Icons:
    2
    Maps:
    13
    Resources:
    23
    Tank Commander has been nice about this. Too nice.

    1) His spell can't possibly do what you claim.
    2) You are a fool for not backing up your map.
    3) Cease speaking like this or you're done here.