• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Spell] Spell Link {How to link several lightning effects?}

Status
Not open for further replies.
For creating lightning effects you need at first 2 locistion, where effect begins and where it ends.

  • Lightning - Create a Chain Lightning - Primary lightning effect from source Point1 to target Point2
Remember to remove location leaks latter.

If you want to link lightning effect with dummies, create a loop that while creating 18 dummies, sets Point2 to position of last created unit (since I'm sure Point1 is constnt in cause of unit who summons whole effect), creates ligthning effect, and removes location leak.
 
Last edited:
Level 13
Joined
Oct 25, 2009
Messages
995
Do this work?
  • For each (Integer A) from 1 to 18, do (Actions)
    • Loop - Actions
      • Unit - Create 1 Lightning_Dummy for (Owner of LC_Caster[LC_Index2]) at (LC_TargetPoint[LC_Index2] offset by 400.00 towards ((Real((Integer A))) x (360.00 / 18.00)) degrees) facing LC_TargetPoint[LC_Index2]
      • Set LC_Dummy2[LC_Index2] = (Last created unit)
      • Unit Group - Add LC_Dummy2[LC_Index2] to LC_Group2[LC_Index2]
      • Unit - Add a 8.00 second Generic expiration timer to (Last created unit)
      • Set LC_DummyPoint[LC_Index2] = (Position of LC_Dummy[LC_Index2])
      • Set LC_UnitPoint[LC_Index2] = (Position of LC_Dummy2[LC_Index2])
      • Lightning - Create a Chain Lightning - Primary lightning effect from source LC_DummyPoint[LC_Index2] to target LC_UnitPoint[LC_Index2]
      • Set LC_LightningEffect[LC_Index2] = (Last created lightning effect)
      • Custom script: call RemoveLocation(udg_LC_UnitPoint[udg_LC_Index2])
      • Custom script: call RemoveLocation(udg_LC_DummyPoint[udg_LC_Index2])
 
Level 13
Joined
Oct 25, 2009
Messages
995
But i can't destroy the lightning effect.
  • For each (Integer A) from 1 to 18, do (Actions)
    • Loop - Actions
      • Lightning - Destroy LC_LightningEffect[LC_IndexLoop]
  • Lightning - Destroy LC_LightningEffect[LC_IndexLoop]
Both not work
 
  • Set LC_LightningEffect[LC_Index2] = (Last created lightning effect)
LC_Index2 doesn't exist, and since you create them in loop (with Integer A) better use:

  • Set LC_LightningEffect[Integer A] = (Last created lightning effect)
With destroying situation is the same, you have to use (Integer A) as index.
  • For each (Integer A) from 1 to 18, do (Actions)
    • Loop - Actions
      • Lightning - Destroy LC_LightningEffect[Integer A]
 
Status
Not open for further replies.
Top