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

Chain Lightning Advanced Spell Request

Status
Not open for further replies.
Hello, Gods of triggers! I've made a very simple spell:

  • SpellChainLightning
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Chain Lightning
    • Actions
      • Hashtable - Create a hashtable
      • Set MB_prev = (Triggering unit)
      • Set MB_targ = (Target unit of ability being cast)
      • Unit Group - Add MB_prev to MB_TmpGroup
      • Unit Group - Add (Attacked unit) to MB_TmpGroup
      • Set MB_TempPoint = (Position of MB_prev)
      • Set MB_TempPoint02 = (Position of MB_targ)
      • Set MB_TempRegion = (Region(MB_TempPoint02, MB_TempPoint))
      • Set MB_SMax = (Height of MB_TempRegion)
      • Set MB_Number01 = (Number of units in MB_TmpGroup)
      • Set MB_Number02 = (Number of units in MB_TmpGroup)
      • Special Effect - Create a special effect at MB_TempPoint using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
      • Custom script: call RemoveLocation(udg_MB_TempPoint)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A ground unit) Equal to True
        • Then - Actions
          • Unit - Create 1 Lightning for Player 1 (Red) at MB_TempPoint02 facing Default building facing degrees
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (MB_TempRegion contains MB_targ) Equal to True
            • Then - Actions
              • Set MB_TempRegion02 = (Region(MB_TempPoint02, MB_TempPoint))
              • Unit - Create 1 Lightning for Player 1 (Red) at (Center of MB_TempRegion02) facing Default building facing degrees
              • Set MB_target04 = (Last created unit)
              • Custom script: call RemoveLocation(udg_MB_TempPoint02)
              • Lightning - Create a Chain Lightning - Primary lightning effect from source MB_TempPoint02 to target MB_TempPoint
              • Set Lightning01 = (Last created lightning effect)
              • Lightning - Create a Chain Lightning - Primary lightning effect from source MB_TempPoint02 to target (Position of (Random unit from MB_TmpGroup))
              • Set Lightning02 = (Last created lightning effect)
              • Unit - Create 1 Lightning for Player 1 (Red) at (Center of MB_TempRegion02) facing Default building facing degrees
              • Set MB_target05 = (Last created unit)
              • Custom script: call RemoveLocation(udg_MB_TempPoint02)
              • For each (Integer A) from 1 to 19, do (Actions)
                • Loop - Actions
                  • Set MB_TempPoint03 = (Position of (Target unit of ability being cast))
                  • Special Effect - Create a special effect at MB_TempPoint03 using Abilities\Spells\Other\Doom\DoomDeath.mdl
                  • Custom script: call RemoveLocation(udg_MB_TempPoint03)
                  • Special Effect - Create a special effect at (MB_TempPoint03 offset by (100.00, 100.00)) using Abilities\Spells\Other\Doom\DoomDeath.mdl
                  • Lightning - Create a Chain Lightning - Primary lightning effect from source MB_TempPoint02 to target MB_TempPoint
                  • Custom script: call RemoveLocation(udg_MB_TempPoint03)
                  • Special Effect - Create a special effect at (MB_TempPoint03 offset by (100.00, 100.00)) using Abilities\Spells\Other\Doom\DoomDeath.mdl
                  • Custom script: call RemoveLocation(udg_MB_TempPoint03)
                  • Special Effect - Create a special effect at (MB_TempPoint03 offset by (100.00, 100.00)) using Abilities\Spells\Other\Doom\DoomDeath.mdl
                  • Custom script: call RemoveLocation(udg_MB_TempPoint03)
                  • Special Effect - Create a special effect at (MB_TempPoint03 offset by (100.00, 100.00)) using Abilities\Spells\Other\Doom\DoomDeath.mdl
                  • Custom script: call RemoveLocation(udg_MB_TempPoint03)
                  • Special Effect - Create a special effect at (MB_TempPoint03 offset by (100.00, 100.00)) using Abilities\Spells\Other\Doom\DoomDeath.mdl
                  • Custom script: call RemoveLocation(udg_MB_TempPoint03)
            • Else - Actions
        • Else - Actions
I want from you to make this chain lightning spell more advanced in every way you want or you can make a new spell. I want the chains of lightning being circular. I really need this spell.
(+rep)
 
Last edited:
Level 25
Joined
May 11, 2007
Messages
4,651
Wat.
You've made a spell and now you want it more advanced? Advanced how?

I can make it spray pink unicorns that tell each player they love them every 0.357 second. Is it advanced enough?
 
Level 8
Joined
Jan 28, 2016
Messages
486
Your trigger has numerous flaws in it. I'd help you fix it but I don't know what your spell is meant to do (might want to add that in the OP). In the meantime, I strongly recommend that you take a look at Memory Leaks.

  • You're creating a hashtable each time the spell is cast, which is never used
  • You add the Attacking Unit to the group but there is no Attacking Unit with that event (maybe Target unit of ability being cast?)
  • You're creating a region between the two units and storing it's height, which isn't necessary
  • You're storing the number of units in the group into two separate variables, which again, are not used
  • The FireLordDeathExplode effect is leaking because it isn't destroyed
  • In your second If-Then-Else statement, both lightning units are leaking a location each when created
  • In your loop, each special effect is leaking. You also remove the location after the first special effect and therefore each subsequent effect will be most likely created at Point(0,0) as there is no longer a reference to the initial location. Additionally, this makes each subsequent custom script call to remove the location pointless (pun not intended [ok, it was intended])
 
Your simple spell is too advanced for me.
Really?? But it is just a simple spell. You cannot make spells like this??
What does it do?
When you attack to a target unit with the chain lightning spell, it would make some fire effects and a big Chain of Lightning from a far distance to the triggering unit.
 
Level 8
Joined
Jan 28, 2016
Messages
486
When you attack to a target unit with the chain lightning spell, it would make some fire effects and a big Chain of Lightning from a far distance to the triggering unit.

I guess that's a start. Can you elaborate? For example, do you want the fire effects to play in a circle around the target? The more details about what the spell does or what it should do, the better.
 
Level 8
Joined
Jan 28, 2016
Messages
486
If you just want the effects in a circle (Eg: ring of fire), something as simple as this would do. You would just need to adjust the number of special effects, which type and the angle per effect. The example plays 16 effects every 22.5° around the target at a distance of 256.

  • Chain Lighning Adv
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Finger of Death (Archimonde)
    • Actions
      • Set TempPoint = (Position of (Target unit of ability being cast))
      • For each (Integer LoopInteger) from 1 to 16, do (Actions)
        • Loop - Actions
          • Set LoopPoint = (TempPoint offset by 256.00 towards (22.50 x (Real(LoopInteger))) degrees)
          • Special Effect - Create a special effect at LoopPoint using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation( udg_LoopPoint )
      • Custom script: call RemoveLocation( udg_TempPoint )
 
If you just want the effects in a circle (Eg: ring of fire), something as simple as this would do. You would just need to adjust the number of special effects, which type and the angle per effect. The example plays 16 effects every 22.5° around the target at a distance of 256.

  • Chain Lighning Adv
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Finger of Death (Archimonde)
    • Actions
      • Set TempPoint = (Position of (Target unit of ability being cast))
      • For each (Integer LoopInteger) from 1 to 16, do (Actions)
        • Loop - Actions
          • Set LoopPoint = (TempPoint offset by 256.00 towards (22.50 x (Real(LoopInteger))) degrees)
          • Special Effect - Create a special effect at LoopPoint using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation( udg_LoopPoint )
      • Custom script: call RemoveLocation( udg_TempPoint )
I want lots of this effect move around a circle.
 
Level 8
Joined
Jan 28, 2016
Messages
486
I want lots of this effect move around a circle.

Still, that doesn't really help much. I know this is a request forum but you can't expect others to read your mind. You might want to figure out what exactly you want from this spell because until you know what you want, we can't help.
 
I made a Spell somehow to the given information.

Lightning Circle

Creates 4 Lightning-Orbs this will circle around the Caster. Each Lightning sends Electric energie between Caster and Orb damaging all Foes between and deals 30/50/70 Dmg a second.

Credits:
To Install:
  • Make sure your Editor auto creates unknown Variables
  • Copy the folders below "Requier"
  • Copy Lightning Circle
  • Copy The Lightning Orb Unit
  • Copy The Lightning Spell

Check This Trigger to Config
  • Lightning Circle INit
    • Ereignisse
      • Map initialization
    • Bedingungen
    • Aktionen
      • Hashtabelle - Create a hashtable
      • Set Hash = (Last created hashtable)
      • Set Lightning_Amount[1] = 4
      • Set Lightning_Amount[2] = 4
      • Set Lightning_Amount[3] = 4
      • -------- Duration in seconds. --------
      • Set Lightning_Duration[1] = 13.00
      • Set Lightning_Duration[2] = 13.00
      • Set Lightning_Duration[3] = 13.00
      • -------- How far goes the Lightning --------
      • Set Lightning_Distance[1] = 400.00
      • Set Lightning_Distance[2] = 550.00
      • Set Lightning_Distance[3] = 700.00
      • -------- How many ° a second. --------
      • Set Lightning_Speed[1] = 20.00
      • Set Lightning_Speed[2] = 26.00
      • Set Lightning_Speed[3] = 32.00
      • Set Lightning_DpS[1] = 30.00
      • Set Lightning_DpS[2] = 50.00
      • Set Lightning_DpS[3] = 70.00
      • -------- How far around the Lightning Units are Hit. --------
      • Set Lightning_AoE[1] = 60.00
      • Set Lightning_AoE[2] = 60.00
      • Set Lightning_AoE[3] = 60.00
      • -------- This will be Played on Damaged Units --------
      • Set Lightning_SFX_OnHit = Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
      • -------- on which body part: Chest or Origin are recommented --------
      • Set Lightning_SFX_OnHit_Attachment = chest
 

Attachments

  • Lightning Circling.w3x
    50.3 KB · Views: 55
I made a Spell somehow to the given information.

Lightning Circle

Creates 4 Lightning-Orbs this will circle around the Caster. Each Lightning sends Electric energie between Caster and Orb damaging all Foes between and deals 30/50/70 Dmg a second.

Credits:
To Install:
  • Make sure your Editor auto creates unknown Variables
  • Copy the folders below "Requier"
  • Copy Lightning Circle
  • Copy The Lightning Orb Unit
  • Copy The Lightning Spell

Check This Trigger to Config
  • Lightning Circle INit
    • Ereignisse
      • Map initialization
    • Bedingungen
    • Aktionen
      • Hashtabelle - Create a hashtable
      • Set Hash = (Last created hashtable)
      • Set Lightning_Amount[1] = 4
      • Set Lightning_Amount[2] = 4
      • Set Lightning_Amount[3] = 4
      • -------- Duration in seconds. --------
      • Set Lightning_Duration[1] = 13.00
      • Set Lightning_Duration[2] = 13.00
      • Set Lightning_Duration[3] = 13.00
      • -------- How far goes the Lightning --------
      • Set Lightning_Distance[1] = 400.00
      • Set Lightning_Distance[2] = 550.00
      • Set Lightning_Distance[3] = 700.00
      • -------- How many ° a second. --------
      • Set Lightning_Speed[1] = 20.00
      • Set Lightning_Speed[2] = 26.00
      • Set Lightning_Speed[3] = 32.00
      • Set Lightning_DpS[1] = 30.00
      • Set Lightning_DpS[2] = 50.00
      • Set Lightning_DpS[3] = 70.00
      • -------- How far around the Lightning Units are Hit. --------
      • Set Lightning_AoE[1] = 60.00
      • Set Lightning_AoE[2] = 60.00
      • Set Lightning_AoE[3] = 60.00
      • -------- This will be Played on Damaged Units --------
      • Set Lightning_SFX_OnHit = Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
      • -------- on which body part: Chest or Origin are recommented --------
      • Set Lightning_SFX_OnHit_Attachment = chest
Hey Tasyen! That's simply great! That is what I was looking for.
Thanks, mate!
+rep
Edit: Did you create this spell in this short time?
Edit2: I thought you made the jass codes.
 
Last edited:
Status
Not open for further replies.
Top