• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Electric Web V1.02

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)


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.



- Heavily Configurable
- Simple
- Pretty
- Unique



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



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

Moderator

M

Moderator

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

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.
 
Level 6
Joined
Dec 8, 2009
Messages
165
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

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).
 
Level 1
Joined
May 23, 2013
Messages
1
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
 
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.
 
Level 1
Joined
Sep 21, 2012
Messages
2
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.................
 
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.................

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