• 🏆 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!

Lightning Spells v.1.03

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: Apheraz Lucent
My third spell :D
As far as I know, its leak-less and MUI.

[This is the version 1.00]
Please give suggestions and comments.
[Version 1.01]
Decreased the range of chain lightning to 500.
Spells now do not hit immune units.
Chain lightning is now using loopings.
I'm reuploading the video, in flv format(just know that wmv format sucks)


The first spell - Chain Lightning.
{4/5/6 X of current mana, able to bounce up to 5 times, dealing 20% lesser each time.}

You are able to use up all your mana and deal the damage to the target. It will also destroy the target's mana by 0.5 X of your mana. The bouncing rule aplies to this as well. It will also purge units, slowing them for 8 seconds. However, it will only bounce up to 5 times maximum.


The second spell - Lightning Shield.
Primary damage - {-1 hp and -1 mana per second, if there is no more mana, -2 hp}
Secondary damage - {-0.5 mana per second, if there is no more mana, -0.5 hp}

Units near the center of the shield will take primary damage while units near the outer shield will take secondary damage. Shield last for 3/6/9 seconds.


The third spell - Lightning Rush.
Primary damage - {1/2/4 Damage, enemy units in an AOE of 350.

Allows to pass through units and deal damage to nearby enemy units. Last for 10 seconds.

[warning - the third spell isn't confirmed MUI yet, download at your own risk]

Takes 6hours + to upload.

Remember to give credits when you use them.

Keywords:
lightning, Lightning, Awesome, shield, rush
Contents

Lightninig Spell v.1.03 (Map)

Reviews
12.12 IcemanBo: For long time as NeedsFix. Rejected. Bribe: Still could use some changes by implementing the bj_wantDestroyGroup custom script, but I see you've appended the other suggetions. I'm not sure why your indexing is so complicated...

Moderator

M

Moderator

12.12
IcemanBo: For long time as NeedsFix. Rejected.

Bribe:

Still could use some changes by implementing the bj_wantDestroyGroup custom script, but I see you've appended the other suggetions.

I'm not sure why your indexing is so complicated, especially the weird way you decrease the end/index counters in the way you loop through the instances. Based on my experiencing with indexing it looks quite unstable and not reliable.
 
Level 5
Joined
May 27, 2009
Messages
94
Uhmm weird video testing.
Learn to use loops seriosuly

  • chain lightning
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to |cffC0C0C0Chain Lightning|r
        • Then - Actions
          • Set TempDamage1 = (((Mana of (Triggering unit)) x ((Real((Level of |cffC0C0C0Chain Lightning|r for (Triggering unit)))) + 3.00)) x 1.00)
          • Set TempPoint1 = (Position of (Target unit of ability being cast))
          • Special Effect - Create a special effect at TempPoint1 using war3mapImported\Great Lightning.mdx
          • Special Effect - Destroy (Last created special effect)
          • Unit Group - Add (Target unit of ability being cast) to TempGroup1
          • Unit - Set mana of (Target unit of ability being cast) to ((Mana of (Target unit of ability being cast)) - (TempDamage1 x 0.10))
          • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing TempDamage1 damage of attack type Spells and damage type Normal
          • Unit - Create 1 Purge Dummy for (Owner of (Triggering unit)) at TempPoint1 facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Orc Shaman - Purge (Target unit of ability being cast)
          • Set TempGroup2 = (Units within 1000.00 of TempPoint1 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is in TempGroup1) Equal to False))))
          • Set TempUnit1 = (Random unit from TempGroup2)
          • Set TempDamage1 = (((Mana of (Triggering unit)) x ((Real((Level of |cffC0C0C0Chain Lightning|r for (Triggering unit)))) + 3.00)) x 0.80)
          • Unit Group - Add TempUnit1 to TempGroup1
          • Unit - Set mana of TempUnit1 to ((Mana of TempUnit1) - (TempDamage1 x 0.10))
          • Unit - Cause (Triggering unit) to damage TempUnit1, dealing TempDamage1 damage of attack type Spells and damage type Normal
          • Unit - Create 1 Purge Dummy for (Owner of (Triggering unit)) at TempPoint1 facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Orc Shaman - Purge TempUnit1
          • Custom script: call RemoveLocation(udg_TempPoint1)
          • Custom script: call DestroyGroup(udg_TempGroup2)
          • Set TempPoint1 = (Position of TempUnit1)
          • Special Effect - Create a special effect at TempPoint1 using war3mapImported\Great Lightning.mdx
          • Special Effect - Destroy (Last created special effect)
          • Set TempGroup2 = (Units within 1000.00 of TempPoint1 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is in TempGroup1) Equal to False))))
          • Set TempUnit1 = (Random unit from TempGroup2)
          • Set TempDamage2 = (TempDamage1 x 0.80)
          • Unit Group - Add TempUnit1 to TempGroup1
          • Unit - Set mana of TempUnit1 to ((Mana of TempUnit1) - (TempDamage2 x 0.10))
          • Unit - Cause (Triggering unit) to damage TempUnit1, dealing TempDamage2 damage of attack type Spells and damage type Normal
          • Unit - Create 1 Purge Dummy for (Owner of (Triggering unit)) at TempPoint1 facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Orc Shaman - Purge TempUnit1
          • Custom script: call RemoveLocation(udg_TempPoint1)
          • Custom script: call DestroyGroup(udg_TempGroup2)
          • Set TempPoint1 = (Position of TempUnit1)
          • Special Effect - Create a special effect at TempPoint1 using war3mapImported\Great Lightning.mdx
          • Special Effect - Destroy (Last created special effect)
          • Set TempGroup2 = (Units within 1000.00 of TempPoint1 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is in TempGroup1) Equal to False))))
          • Set TempUnit1 = (Random unit from TempGroup2)
          • Set TempDamage1 = (TempDamage2 x 0.80)
          • Unit Group - Add TempUnit1 to TempGroup1
          • Unit - Set mana of TempUnit1 to ((Mana of TempUnit1) - (TempDamage1 x 0.10))
          • Unit - Cause (Triggering unit) to damage TempUnit1, dealing TempDamage1 damage of attack type Spells and damage type Normal
          • Unit - Create 1 Purge Dummy for (Owner of (Triggering unit)) at TempPoint1 facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Orc Shaman - Purge TempUnit1
          • Custom script: call RemoveLocation(udg_TempPoint1)
          • Custom script: call DestroyGroup(udg_TempGroup2)
          • Set TempPoint1 = (Position of TempUnit1)
          • Special Effect - Create a special effect at TempPoint1 using war3mapImported\Great Lightning.mdx
          • Special Effect - Destroy (Last created special effect)
          • Set TempGroup2 = (Units within 1000.00 of TempPoint1 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is in TempGroup1) Equal to False))))
          • Set TempUnit1 = (Random unit from TempGroup2)
          • Set TempDamage2 = (TempDamage1 x 0.80)
          • Unit Group - Add TempUnit1 to TempGroup1
          • Unit - Set mana of TempUnit1 to ((Mana of TempUnit1) - (TempDamage2 x 0.10))
          • Unit - Cause (Triggering unit) to damage TempUnit1, dealing TempDamage2 damage of attack type Spells and damage type Normal
          • Unit - Create 1 Purge Dummy for (Owner of (Triggering unit)) at TempPoint1 facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Orc Shaman - Purge TempUnit1
          • Custom script: call RemoveLocation(udg_TempPoint1)
          • Custom script: call DestroyGroup(udg_TempGroup2)
          • Set TempPoint1 = (Position of TempUnit1)
          • Special Effect - Create a special effect at TempPoint1 using war3mapImported\Great Lightning.mdx
          • Special Effect - Destroy (Last created special effect)
          • Set TempGroup2 = (Units within 1000.00 of TempPoint1 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is in TempGroup1) Equal to False))))
          • Set TempUnit1 = (Random unit from TempGroup2)
          • Set TempDamage1 = (TempDamage2 x 0.80)
          • Unit Group - Add TempUnit1 to TempGroup1
          • Unit - Set mana of TempUnit1 to ((Mana of TempUnit1) - (TempDamage1 x 0.10))
          • Unit - Cause (Triggering unit) to damage TempUnit1, dealing TempDamage1 damage of attack type Spells and damage type Normal
          • Unit - Create 1 Purge Dummy for (Owner of (Triggering unit)) at TempPoint1 facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Orc Shaman - Purge TempUnit1
          • Custom script: call RemoveLocation(udg_TempPoint1)
          • Custom script: call DestroyGroup(udg_TempGroup2)
          • Custom script: call DestroyGroup(udg_TempGroup1)
          • Unit - Set mana of (Triggering unit) to 0.00
        • Else - Actions

Secondly the other spell lightning shield lags my computer you spam too much lightning sfx.
 
Level 8
Joined
Jun 30, 2010
Messages
259
It fails D:, my fps was too low and it turn out to be this( i set the cd to 0 and spammed it :p )

Edit: U can watch it in HD if u like. :p

Edit 2: lol, too much lightning effects huh.. hmm... will get to it...

Edit 3: lol, i know how to use loops, but this can't use loops. -_-

It can be looped.
Since you are using the same trigger almost over and over again, you can make this a loop. You might encounter some small problems if you are using different values in the trigger, but it should not be any problem, since you can make this into a variable, for instance:
  • Unit - Set mana of TempUnit1 to ((Mana of TempUnit1) - (TempDamage1 x 0.10))
  • Unit - Set mana of TempUnit1 to ((Mana of TempUnit1) - (TempDamage2 x 0.10))
Since you are using these seperatively, and in a specified order (Temp1,Temp2,Temp1,Temp2...) You can add a Boolean in an If/Then/Else which does:
  • If
    • Temp Equal to True
  • Then
    • ---Run Loop 1---
    • Set Temp = False
  • Else
    • ---Run Loop 2---
    • Set Temp = True
For example, when the lightning shall hit another target, and you are using this
  • Set TempGroup2 = (Units within 1000.00 of TempPoint1 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is in TempGroup1) Equal to False))))
Having this in a loop will work if you are changing the TempPoint1 in each loop:
  • Loop - Actions
    • Set TempPoint1 = (Some Location of Some Unit) within 100.00 range of TempPoint1
    • Set TempGroup2 = (Units within 1000.00 of TempPoint1 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is in TempGroup1) Equal to False))))
Now, it will move the lightning.
As you can see, you will be able to loop it.
Hope this helps!
 
Level 12
Joined
Apr 4, 2010
Messages
862
It can be looped.
Since you are using the same trigger almost over and over again, you can make this a loop. You might encounter some small problems if you are using different values in the trigger, but it should not be any problem, since you can make this into a variable, for instance:
  • Unit - Set mana of TempUnit1 to ((Mana of TempUnit1) - (TempDamage1 x 0.10))
  • Unit - Set mana of TempUnit1 to ((Mana of TempUnit1) - (TempDamage2 x 0.10))
Since you are using these seperatively, and in a specified order (Temp1,Temp2,Temp1,Temp2...) You can add a Boolean in an If/Then/Else which does:
  • If
    • Temp Equal to True
  • Then
    • ---Run Loop 1---
    • Set Temp = False
  • Else
    • ---Run Loop 2---
    • Set Temp = True
For example, when the lightning shall hit another target, and you are using this
  • Set TempGroup2 = (Units within 1000.00 of TempPoint1 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is in TempGroup1) Equal to False))))
Having this in a loop will work if you are changing the TempPoint1 in each loop:
  • Loop - Actions
    • Set TempPoint1 = (Some Location of Some Unit) within 100.00 range of TempPoint1
    • Set TempGroup2 = (Units within 1000.00 of TempPoint1 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is in TempGroup1) Equal to False))))
Now, it will move the lightning.
As you can see, you will be able to loop it.
Hope this helps!

Thanks, the unit can't be hit twice because I added them to the TempGroup1.

I don't like the triggering for chain lightning, just looks bad..

Yea, going to fix that ugly chain lightning, it doesn't hit the close'est unit next to the target...

I have made a review of your spell.

I suggest you read it and comment it!
Thank you :)
Click here for the review of this spell.

Note: I am not a moderator or admin of the hive forum, my reviews are only there to give you guidelines before a moderator approve or reject your spell.

Target it gonna be hit'd twice in your loop.
TempGroup1 doesn't leak , maybe you deleted that custom script or didn't see it.
Lightning shield units and the middle lightning shield spawn at the same time, so there is no need to change it, and it last for the same time.
Unit doesn't leak at all. Only unit groups, points and stuffs.
I don't see the need of that trigger as it only wastes memory.
And MUI, its completely MUI, there are no waits, used stuffs are only unit groups and a temporary unit.
Other than that, thanks.

---Fixing the chain lightning.
 
Level 4
Joined
Dec 7, 2010
Messages
62
Thanks, the unit can't be hit twice because I added them to the TempGroup1.



Yea, going to fix that ugly chain lightning, it doesn't hit the close'est unit next to the target...



Target it gonna be hit'd twice in your loop.
TempGroup1 doesn't leak , maybe you deleted that custom script or didn't see it.
Lightning shield units and the middle lightning shield spawn at the same time, so there is no need to change it, and it last for the same time.
Unit doesn't leak at all. Only unit groups, points and stuffs.
I don't see the need of that trigger as it only wastes memory.
And MUI, its completely MUI, there are no waits, used stuffs are only unit groups and a temporary unit.
Other than that, thanks.

---Fixing the chain lightning.

I might have missed some things, but yes it has some errors.
You must make sure units are not magic immune, YOU MUST!
You must also make sure the triggers are not already turned on!
And yes, if you have set a unit in a variable (without removing the unit after) it can malfunction.
 
Level 12
Joined
Apr 4, 2010
Messages
862
I might have missed some things, but yes it has some errors.
You must make sure units are not magic immune, YOU MUST!
You must also make sure the triggers are not already turned on!
And yes, if you have set a unit in a variable (without removing the unit after) it can malfunction.

unit is not used twice..
and the damage, its magic type damage so it will not deal damage.
(will edit the mana part..)
turning on triggers twice, will not waste as much memory as checking conditions then turning on triggers.
 
Top