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

Spray of Electricity [Version 1.2a]

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
I was bored and decided to create a spell that I could upload here. It's fully MUI and leakless. This spell shouldn't be that hard to understand and learn from, even though I've used some JASS. Other than that, it's GUI.

I don't really know why this spell appeared in my head, all the effect and such. Think it's from Diablo 2 or something.

Please, try it in-game and rate this spell and do post a comment, thanks! :)




  • Spray of Electricity 1 Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Spray of Electricity [EXAMPLE 1]
    • Actions
      • -------- BELOW IS THE VARIABLES THAT IS REQUIRED FOR THIS SPELL TO WORK PROPERLY, AND SHOULD NOT BE CHANGED --------
      • -------- --- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SoE_Index[1] Less than or equal to 0
        • Then - Actions
          • Trigger - Turn on Spray of Electricity Add Loop <gen>
        • Else - Actions
      • Custom script: set udg_SoE_Index[0] = udg_SoE_Index[0] + 1
      • Custom script: set udg_SoE_Index[1] = udg_SoE_Index[1] + 1
      • Custom script: set udg_SoE_Off[udg_SoE_Index[0]] = false
      • Custom script: set udg_SoE_Caster[udg_SoE_Index[0]] = GetTriggerUnit()
      • Custom script: set udg_SoE_CasterX[udg_SoE_Index[0]] = GetUnitX(GetTriggerUnit())
      • Custom script: set udg_SoE_CasterY[udg_SoE_Index[0]] = GetUnitY(GetTriggerUnit())
      • Custom script: set udg_SoE_Timer_NewLightning_Count[udg_SoE_Index[0]] = 0.0
      • -------- --- --------
      • -------- THE VARIABLES BELOW IS THE VARIABLES THAT YOU CAN EDIT AND MODIFY THIS SPELL WITH --------
      • -------- --- --------
      • -------- This is how many lightnings that will be created. --------
      • Set SoE_LightningCount[SoE_Index[0]] = (75 + (25 x (Level of (Ability being cast) for (Triggering unit))))
      • -------- This is the amount of damage EACH lightning will do. --------
      • Set SoE_Damage[SoE_Index[0]] = (10.00 + (10.00 x (Real((Level of (Ability being cast) for (Triggering unit))))))
      • -------- This is the amount of time it must take before a new lightning is created. --------
      • Set SoE_Timer_NewLightning[SoE_Index[0]] = 0.03
      • -------- This is the amount of speed the lightning will have. --------
      • Set SoE_DummySpeed[SoE_Index[0]] = 27.50
      • -------- This is the amount of distance the lightnings will travel. --------
      • Set SoE_DummyDistance[SoE_Index[0]] = 1350.00
      • -------- This is the "hitbox", the detection range the lightning will have to detect a unit. --------
      • Set SoE_HitBox[SoE_Index[0]] = 100.00
      • -------- If this is set to "false", the lightning can go through units and damage others behind. If its set to "true", the lightning --------
      • -------- will be removed when it hits a unit. --------
      • Set SoE_RemoveOnHit[SoE_Index[0]] = False
      • -------- This is the model of the lightning. --------
      • Set SoE_ModelEffect[SoE_Index[0]] = Abilities\Weapons\SerpentWardMissile\SerpentWardMissile.mdl
      • -------- If you want the hero be able to move around while casting the spell, set this to true. --------
      • Set SoE_EnableMovement[SoE_Index[0]] = False
      • -------- If you want the hero be able to move around while casting the spell, set this to true. --------
      • Set SoE_MissileSpawnDistance[SoE_Index[0]] = 30.00
      • -------- This is how "straight" the missiles will go. If it's set to 0.00, the missiles will always go straight. --------
      • -------- But if it's set to (as an example) 15.00, the missile may change their direction a little and won't go 100% straight. --------
      • Set SoE_AimValue[SoE_Index[0]] = 10.00
      • -------- --- --------
      • -------- BELOW IS THE ATTACHMENT EFFECTS, CHANGE THEM TO THE ONES YOU WANT --------
      • -------- --- --------
      • Special Effect - Create a special effect attached to the hand, left of SoE_Caster[SoE_Index[0]] using Abilities\Weapons\SerpentWardMissile\SerpentWardMissile.mdl
      • Set SoE_AttachmentEffect1[SoE_Index[0]] = (Last created special effect)
      • Special Effect - Create a special effect attached to the hand, right of SoE_Caster[SoE_Index[0]] using Abilities\Weapons\SerpentWardMissile\SerpentWardMissile.mdl
      • Set SoE_AttachmentEffect2[SoE_Index[0]] = (Last created special effect)


  • Spray of Electricity 2 Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Spray of Electricity [EXAMPLE 2]
    • Actions
      • -------- BELOW IS THE VARIABLES THAT IS REQUIRED FOR THIS SPELL TO WORK PROPERLY, AND SHOULD NOT BE CHANGED --------
      • -------- --- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SoE_Index[1] Less than or equal to 0
        • Then - Actions
          • Trigger - Turn on Spray of Electricity Add Loop <gen>
        • Else - Actions
      • Custom script: set udg_SoE_Index[0] = udg_SoE_Index[0] + 1
      • Custom script: set udg_SoE_Index[1] = udg_SoE_Index[1] + 1
      • Custom script: set udg_SoE_Off[udg_SoE_Index[0]] = false
      • Custom script: set udg_SoE_Caster[udg_SoE_Index[0]] = GetTriggerUnit()
      • Custom script: set udg_SoE_CasterX[udg_SoE_Index[0]] = GetUnitX(GetTriggerUnit())
      • Custom script: set udg_SoE_CasterY[udg_SoE_Index[0]] = GetUnitY(GetTriggerUnit())
      • Custom script: set udg_SoE_Timer_NewLightning_Count[udg_SoE_Index[0]] = 0.0
      • -------- --- --------
      • -------- THE VARIABLES BELOW IS THE VARIABLES THAT YOU CAN EDIT AND MODIFY THIS SPELL WITH --------
      • -------- --- --------
      • -------- This is how many lightnings that will be created. --------
      • Set SoE_LightningCount[SoE_Index[0]] = (70 + (15 x (Level of (Ability being cast) for (Triggering unit))))
      • -------- This is the amount of damage EACH lightning will do. --------
      • Set SoE_Damage[SoE_Index[0]] = (5.00 + (5.00 x (Real((Level of (Ability being cast) for (Triggering unit))))))
      • -------- This is the amount of time it must take before a new lightning is created. --------
      • Set SoE_Timer_NewLightning[SoE_Index[0]] = 0.06
      • -------- This is the amount of speed the lightning will have. --------
      • Set SoE_DummySpeed[SoE_Index[0]] = 27.50
      • -------- This is the amount of distance the lightnings will travel. --------
      • Set SoE_DummyDistance[SoE_Index[0]] = 1350.00
      • -------- This is the "hitbox", the detection range the lightning will have to detect a unit. --------
      • Set SoE_HitBox[SoE_Index[0]] = 100.00
      • -------- If this is set to "false", the lightning can go through units and damage others behind. If its set to "true", the lightning --------
      • -------- will be removed when it hits a unit. --------
      • Set SoE_RemoveOnHit[SoE_Index[0]] = False
      • -------- This is the model of the lightning. --------
      • Set SoE_ModelEffect[SoE_Index[0]] = Abilities\Weapons\SerpentWardMissile\SerpentWardMissile.mdl
      • -------- If you want the hero be able to move around while casting the spell, set this to true. --------
      • Set SoE_EnableMovement[SoE_Index[0]] = True
      • -------- If you want the hero be able to move around while casting the spell, set this to true. --------
      • Set SoE_MissileSpawnDistance[SoE_Index[0]] = 30.00
      • -------- This is how "straight" the missiles will go. If it's set to 0.00, the missiles will always go straight. --------
      • -------- But if it's set to (as an example) 15.00, the missile may change their direction a little and won't go 100% straight. --------
      • Set SoE_AimValue[SoE_Index[0]] = 10.00
      • -------- --- --------
      • -------- BELOW IS THE ATTACHMENT EFFECTS, CHANGE THEM TO THE ONES YOU WANT --------
      • -------- --- --------
      • Special Effect - Create a special effect attached to the hand, left of SoE_Caster[SoE_Index[0]] using Abilities\Weapons\SerpentWardMissile\SerpentWardMissile.mdl
      • Set SoE_AttachmentEffect1[SoE_Index[0]] = (Last created special effect)
      • Special Effect - Create a special effect attached to the hand, right of SoE_Caster[SoE_Index[0]] using Abilities\Weapons\SerpentWardMissile\SerpentWardMissile.mdl
      • Set SoE_AttachmentEffect2[SoE_Index[0]] = (Last created special effect)


  • Spray of Electricity Add Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- DONT EDIT ANYTHING IN THIS TRIGGER UNLESS YOU DON'T KNOW WHAT YOU'RE DOING! :) --------
      • -------- --- --------
      • For each (Integer SoE_Index[2]) from 1 to SoE_Index[0], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SoE_Off[SoE_Index[2]] Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (SoE_Caster[SoE_Index[2]] is alive) Equal to False
                      • SoE_LightningCount[SoE_Index[2]] Less than or equal to 0
                • Then - Actions
                  • Special Effect - Destroy SoE_AttachmentEffect1[SoE_Index[2]]
                  • Special Effect - Destroy SoE_AttachmentEffect2[SoE_Index[2]]
                  • -------- --- --------
                  • Set SoE_Off[SoE_Index[2]] = True
                  • Set SoE_Index[1] = (SoE_Index[1] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SoE_Index[1] Less than or equal to 0
                    • Then - Actions
                      • Set SoE_Index[0] = 0
                      • Set SoE_Index[1] = 0
                      • Trigger - Turn off Spray of Electricity Add Loop <gen>
                    • Else - Actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SoE_EnableMovement[SoE_Index[2]] Equal to False
                    • Then - Actions
                      • Custom script: call SetUnitX(udg_SoE_Caster[udg_SoE_Index[2]], udg_SoE_CasterX[udg_SoE_Index[2]])
                      • Custom script: call SetUnitY(udg_SoE_Caster[udg_SoE_Index[2]], udg_SoE_CasterY[udg_SoE_Index[2]])
                      • Animation - Reset SoE_Caster[SoE_Index[2]]'s animation
                    • Else - Actions
                  • -------- --- --------
                  • Custom script: set udg_SoE_Timer_NewLightning_Count[udg_SoE_Index[2]] = udg_SoE_Timer_NewLightning_Count[udg_SoE_Index[2]] + 0.03
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SoE_Timer_NewLightning_Count[SoE_Index[2]] Greater than or equal to SoE_Timer_NewLightning[SoE_Index[2]]
                    • Then - Actions
                      • Custom script: set udg_SoE_Timer_NewLightning_Count[udg_SoE_Index[2]] = 0.0
                      • Custom script: set udg_SoE_LightningCount[udg_SoE_Index[2]] = udg_SoE_LightningCount[udg_SoE_Index[2]] - 1
                      • -------- --- --------
                      • Set SoE_Point[0] = (Position of SoE_Caster[SoE_Index[2]])
                      • Set SoE_Point[1] = (SoE_Point[0] offset by SoE_MissileSpawnDistance[SoE_Index[2]] towards ((Facing of SoE_Caster[SoE_Index[2]]) + (Random real number between (0.00 - SoE_AimValue[SoE_Index[2]]) and SoE_AimValue[SoE_Index[2]])) degrees)
                      • -------- --- --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • SoEL_Index[1] Less than or equal to 0
                        • Then - Actions
                          • Trigger - Turn on Spray of Electricity Lightning Loop <gen>
                        • Else - Actions
                      • Custom script: set udg_SoEL_Index[0] = udg_SoEL_Index[0] + 1
                      • Custom script: set udg_SoEL_Index[1] = udg_SoEL_Index[1] + 1
                      • Custom script: set udg_SoEL_Off[udg_SoEL_Index[0]] = false
                      • -------- --- --------
                      • Unit - Create 1 Spray of Electricity_DummyUnit for (Owner of SoE_Caster[SoE_Index[2]]) at SoE_Point[1] facing (Facing of SoE_Caster[SoE_Index[2]]) degrees
                      • Set SoEL_DummyUnit[SoEL_Index[0]] = (Last created unit)
                      • Special Effect - Create a special effect attached to the chest of SoEL_DummyUnit[SoEL_Index[0]] using SoE_ModelEffect[SoE_Index[2]]
                      • Set SoEL_SpecialEffect[SoEL_Index[0]] = (Last created special effect)
                      • Set SoEL_DummySpeed[SoEL_Index[0]] = SoE_DummySpeed[SoE_Index[2]]
                      • Set SoEL_Angle[SoEL_Index[0]] = (Angle from SoE_Point[0] to SoE_Point[1])
                      • Set SoEL_DummyDistance[SoEL_Index[0]] = SoE_DummyDistance[SoE_Index[2]]
                      • Set SoEL_Damage[SoEL_Index[0]] = SoE_Damage[SoE_Index[2]]
                      • Set SoEL_HitBox[SoEL_Index[0]] = SoE_HitBox[SoE_Index[2]]
                      • Set SoEL_RemoveOnHit[SoEL_Index[0]] = SoE_RemoveOnHit[SoE_Index[2]]
                      • -------- --- --------
                      • Custom script: call RemoveLocation(udg_SoE_Point[0])
                      • Custom script: call RemoveLocation(udg_SoE_Point[1])
                    • Else - Actions
            • Else - Actions


  • Spray of Electricity Lightning Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- DONT EDIT ANYTHING IN THIS TRIGGER UNLESS YOU DON'T KNOW WHAT YOU'RE DOING! :) --------
      • -------- --- --------
      • For each (Integer SoEL_Index[2]) from 1 to SoEL_Index[0], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SoEL_Off[SoEL_Index[2]] Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SoEL_DummyDistance[SoEL_Index[2]] Less than or equal to 0.00
                • Then - Actions
                  • Special Effect - Destroy SoEL_SpecialEffect[SoEL_Index[2]]
                  • Unit - Kill SoEL_DummyUnit[SoEL_Index[2]]
                  • -------- --- --------
                  • Set SoEL_Off[SoEL_Index[2]] = True
                  • Set SoEL_Index[1] = (SoEL_Index[1] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SoEL_Index[1] Less than or equal to 0
                    • Then - Actions
                      • Set SoEL_Index[0] = 0
                      • Set SoEL_Index[1] = 0
                      • Trigger - Turn off Spray of Electricity Lightning Loop <gen>
                    • Else - Actions
                • Else - Actions
                  • Custom script: set udg_SoEL_DummyDistance[udg_SoEL_Index[2]] = udg_SoEL_DummyDistance[udg_SoEL_Index[2]] - udg_SoEL_DummySpeed[udg_SoEL_Index[2]]
                  • -------- --- --------
                  • Set SoE_Point[0] = (Position of SoEL_DummyUnit[SoEL_Index[2]])
                  • Set SoE_Point[1] = (SoE_Point[0] offset by SoEL_DummySpeed[SoEL_Index[2]] towards SoEL_Angle[SoEL_Index[2]] degrees)
                  • -------- --- --------
                  • Unit - Move SoEL_DummyUnit[SoEL_Index[2]] instantly to SoE_Point[1]
                  • -------- --- --------
                  • Set SoEL_DamageCounter[SoEL_Index[2]] = (SoEL_DamageCounter[SoEL_Index[2]] + 0.03)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SoEL_DamageCounter[SoEL_Index[2]] Greater than or equal to 0.15
                    • Then - Actions
                      • Set SoEL_DamageCounter[SoEL_Index[2]] = 0.00
                      • Set SoEL_Index[3] = 1
                      • Set SoE_UnitGroup = (Units within SoEL_HitBox[SoEL_Index[2]] of SoE_Point[1] matching (((Matching unit) belongs to an enemy of (Owner of SoEL_DummyUnit[SoEL_Index[2]])) Equal to True))
                      • Unit Group - Pick every unit in SoE_UnitGroup and do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ((Picked unit) is alive) Equal to True
                              • ((Picked unit) is A structure) Equal to False
                              • SoEL_Index[3] Greater than 0
                            • Then - Actions
                              • Set SoEL_Index[3] = (SoEL_Index[3] - 1)
                              • Unit - Cause SoEL_DummyUnit[SoEL_Index[2]] to damage (Picked unit), dealing SoEL_Damage[SoEL_Index[2]] damage of attack type Spells and damage type Normal
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • SoEL_RemoveOnHit[SoEL_Index[2]] Equal to True
                                • Then - Actions
                                  • Custom script: set udg_SoEL_DummyDistance[udg_SoEL_Index[2]] = 0.00
                                • Else - Actions
                            • Else - Actions
                      • Custom script: call DestroyGroup(udg_SoE_UnitGroup)
                    • Else - Actions
                  • -------- --- --------
                  • Custom script: call RemoveLocation(udg_SoE_Point[0])
                  • Custom script: call RemoveLocation(udg_SoE_Point[1])
            • Else - Actions






  • Removed unneccesary actions (SoE_Index[1] = 0 and SoEL_Index[1] = 0)
  • Improved the condition check in the Unit Group.
  • Added two new example abilities (just for fun).
  • Added an option there you can set a special effect that will appear when a unit is damaged by a lightning.


  • Improved ability description text.
  • Improved the dummy unit for the spell.
  • Added a new example ability.
  • Added a "boss", that you can try the spell on.
  • Added an option that allow you to change if the hero will be able to move around while casting or not.
  • Added an option there you can set how far away each lightning will be spawned from the hero.
  • Added an option there you can set how "exact" the lightning will go. If they'll go 100% straight, or may change their direction a little.


  • Release



Keywords:
diablo, demonic, demoness, evil, deadly, lightning, spray, hell, inferno, slaughter, dark, unholy, The_Flood, Flood
Contents

Spray of Electricity V1.2a (Map)

Reviews
Bribe: Unless needed, your variables should be normal variables instead of arrays. Key thing, if you can type the value of an array as an actual integer (0, 1, 2), it can be split into normal variables. Normal variables execute faster and are...

Moderator

M

Moderator

Bribe:

Unless needed, your variables should be normal variables instead of arrays. Key thing, if you can type the value of an array as an actual integer (0, 1, 2), it can be split into normal variables. Normal variables execute faster and are overall much better.

SoEL_Index is a fine examples of this... you never reference anything other than slots 1, 2, 3, which means this should be split into three variables.

The bj_wantDestroyGroup custom script is also a lot faster than setting a group and then destroying it.

Overall a good spell, I can't spot any leaks. But this is a huge efficiency boost that could be given to the system and I recommend implementing such changes before I approve this.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Spray of Electricity [Version 1.0a]

Moin moin =)

== My personal vote: No rejection, no approval (for now) [3/5] ==
(Read my review first, before you think, you understand my vote!)

Ok after downloading and testing the map, I have the following review:

=== Hive rules ===
1) Name of the spell includes Spellname and version [5/5]
2) Testmap include name and version of the spell too [5/5]
3) The description is ok, but I miss a short note what the spell exactly do. Else contains trigger and possibly a change log [4/5]
4) You use many keywords and you should filter some out, for example warcraft, of, red and so on. [3/5]
5) Screenshot for the map is good enough [5/5]

=== The Spell ===
1) It's MPI and MUI [5/5]
2) The idea is cool, didn't see something like this before [5/5]
3) But if I cast the spell twice and more, my fps goes down into hell ( But maybe it's just my weak pc ) [2/5]
4) As far as I know, it's better, if you put the if then else trigger where you check if SoE_Index[1] = 0 out of the loop. [4/5]
5) Mabye bug: When I use your spell, the hero can't blink aways, when I use the blink ability. This should be fixed and your spell should follow the hero then. Ahh I saw, I can't move anyway and that's why blink bugs. [0/5]
6) About filtering: You just filter, if the unit is an enemy, but not if it is magic immune, or a structure or something. Maybe you should add something like that. [3/5]

Note: I'm not good with GUI anymore, but can't you do the loop and lightning loop in 1 trigger? Also I don't see any leaks now with my bad GUI knowledge

Your VARIABLE COPY TRIGGER is a good idea, but not that necessary, because variables will be copied, when someone copy the spell, but it's a nice idea, to make sure, everything is there.

== So what we got in the end ==
Hive rules: 5 + 5 + 4 + 3 + 5 = 22/25 = 88%
Spell: 5 + 5 + 2 + 4 + 0 + 3 = 19/25 = 76%
All: 22 + 19 = 41/50 = 82% [Would be 4/5]

But I only give [3/5] for now, because theere are some (small) changes needed, to make this spell better for example, that the hero can't move while casting the spell and the filter. But when I change some stuff there, I will give you [4/5] + approval, because that's fair then and I can't see more mistakes for now (my bad GUI)

NOTE: My review is nothing against the creator of the spell nor against the spell at all!

Greetings and Peace
Dr. Boom
 
Level 19
Joined
Aug 16, 2007
Messages
881
@Dr. Boom,
Thanks for the review.

=== The Spell ===
3) It's probably your computer, I can cast the spell several times without fps drop.
5) It's supposed to be like that, it's not a bug. Your hero stands in place and spray out lightning and with the mouse you change direction by clicking.
6) I do filter the units, check again.

Thanks again. :)

@88WaRCraFT3,
Thanks :)

@The_Swamp_Warrior,
What do you mean by she got messed?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Nice spell and the triggering seems good, couldn't find any real flaws. The only thing that bothers me is this:
  • Unit - Cause SoEL_DummyUnit[SoEL_Index[2]] to damage (Picked unit), dealing...
You really should make the caster do the damage, not the dummy.

I'd also add these to configurables:
Set SoE_Point[1] = (SoE_Point[0] offset by 25.00 towards ((Facing of SoE_Caster[SoE_Index[2]]) + (Random real number between -15.00 and 15.00)) degrees)


I'd prefer if the SoEIndex wasn't an array, and you used normal integer variables. But that's really a non-issue.

The tooltip was also good, standard WC3 stuff. But:
...the Demoness is able to change the direction of the demonic lightnings by change her rotation
The latter "change" should be "changing".

So well done, I'd rate it 4/5.
 
Level 19
Joined
Aug 16, 2007
Messages
881
@Maker,
I'll fix what you said, but I won't fix the index variable. Thanks :)

@Stanley,
I'll add an option that allow you to choose if you'd want the hero to be able to move or not.

@Klingo,
Dunno, JASS looks more nice and it's faster to write than clicking GUI.

@The_Swamp_Warrior,
I'll see what I can do.

@xBlackRose,
Thanks :)


EDIT: I've updated the spell. Read the changelog for more information.
 
Last edited:
Level 22
Joined
Nov 14, 2008
Messages
3,256
This is good I guess. The randomization is not perfect but hey it works (it's not totally random). It would require one more temporary group to make it 100% random with Random N units out of group yourgroup.

I don't get this, why are you using coordinates in the first loop but not in the second? The conditions you have with Picked unit is alive equals to true and picked unit is a structure equals to false should be set already when you set the unit group variable.

No need to set the soe_index[1] to 0 after you have done the -1 thing. It's already 0 when it reaches the condition.

If the removeonhit variable is set to false, wont the lightnings do hell of a lot damage? As there are no onehitonly groups what I can see.

Anyway you know I like your work alot! Keep it up.
 
Level 19
Joined
Aug 16, 2007
Messages
881
@xorkatoss,
Thanks! :)

@Stanley,
No problem :)

@baassee,
What do you mean with that it isn't random? I think you are talking about the angle thing, right?

I'll fix the condition thing, but I don't really understand what you mean with the coordinates...

About the SoE_Index[1] = 0, I did this just to be sure it's 0 and not -1, -2, but I can remove it.

They won't do a lot of damage, if you check the actions you can see that I've got a real that is checking when the lightning will do damage. Every 0.15 second.

Thanks! :)

@.OmG.,
Nice to hear ^^



Edit: I've updated the spell, please check the changelog.
 
Last edited:
Level 22
Joined
Nov 14, 2008
Messages
3,256
In the electricity lightning loop you have an action called move unit instantly to point. In the other loop, lightning add you are using custom script, call SetUnitX/Y. Why not have those in the lightning loop too?

When you randomize in the group you have a variable that is set to 1. When the group is set, the group loops threw the units and the first unit it goes threw will lower the variable to 0. This is like using FirstOfGroup in JASS, picking the first unit in the group instead of it can be like any unit, first, last, somewhere in the middle. But as long as it works I'm fine with it :D

If you set the lightning dmg interval to 0.0 and speed to a low value it will to heck of a lot damage trust me :D
 
Top