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

Status
Not open for further replies.
Level 6
Joined
Oct 10, 2009
Messages
1,425
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