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

Lightning

Status
Not open for further replies.
Level 6
Joined
Oct 10, 2009
Messages
1,426
Question solved by:
watermelon_1234

Can somebody please explain to me what a lightning is?
What can I use it for?
Why is it there?
What exactly does it do??

There are no tutorials I could find...anywhere...

Help will get rep.
Even if it takes several people.
 
Last edited:
Level 14
Joined
Nov 18, 2007
Messages
1,084
A lightning is the same as the lightning seen in Chain Lightning, Life Drain, Finger of Death, etc. You create lightning in GUI with
  • Lightning - Create a Chain Lightning - Primary lightning effect from source (Position of (Triggering unit)) to target (Center of (Playable map area))
*Note: I know there's location leaks, I'm just giving an example.

Set a lightning variable after its creation:
  • Set MyLightning = (Last created lightning effect)
You can move lightnings after creation:
  • Lightning - Move MyLightning to source (Position of (Triggering unit)) and target (Player 1 (Red) start location)
You can also change a lightning's color with
  • Lightning - Change color of MyLightning to (1.00 1.00 1.00) with 1.00 alpha
When you're done with them, you can destroy them like this:
  • Lightning - Destroy MyLightning
If you use Jass/custom script, you can also change a lightning's height (z).
JASS:
native AddLightningEx takes string codeName, boolean checkVisibility, real x1, real y1, real z1, real x2, real y2, real z2 returns lightning
*Note: It uses coordinates instead of locations.
 
Status
Not open for further replies.
Top