Creating a Lightning with Heigh

G00dG4m3

New Member
Reaction score
1
Well, the title says it all. I need to create a lightning with a modifable heigh (Normal GUI function "Create lightning effect" does create a lightning, but that lightning is on ground and I hate it) and action to move that lightning. I read smt that it cannot be made w/e JASS.

+rep who really solves this little problem.
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
I read smt that it cannot be made w/e JASS.
and it's true.

Trigger:
  • trigger1
    • events
    • conditions
    • actions
      • ....
      • set Point1 = <some point>
      • set Point2 = <some point>
      • Custom Script: call AddLightningEx("string", GetLocationX(udg_Point1), GetLocationY(udg_Point1), <some height>, GetLocationX(udg_Point2), GetLocationY(udg_Point2), <some height>)
      • Custom Script: call RemoveLocation(udg_Point1)
      • Custom Script: call RemoveLocation(udg_Point2)
      • ....


to get the string path, make a "Create Lightning" action in GUI and convert it to custom script

for chain lightning, I think it's "CLPB"
 

Bogrim

y hello thar
Reaction score
154
I don't think that you can move a lightning effect. You have to destroy it and recreate it. The smaller the interval is between the lightnings, the smoother the animation becomes.
 

tooltiperror

Super Moderator
Reaction score
231
What the above poster said is true.

Some vJASS Systems create animation systems with lightning, but it is just quickly creating and destroying.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
I don't think that you can move a lightning effect. You have to destroy it and recreate it.
What the above poster said is true.

Um...no? You absolutely can move lightning: [ljass]MoveLightningEx[/ljass]. That just changes the start and end positions, though; you still would need a periodic effect to create the illusion of a smooth sliding motion.
 

tooltiperror

Super Moderator
Reaction score
231
I thought we were talking about moving it, like 20 Warcraft Units to the right, not just moving the x/y.
 

Bogrim

y hello thar
Reaction score
154
What the above poster said is true.
I said "I think" because I wasn't sure whether there was a function for moving lightnings, though the function Weep posted is essentially the same effect. You'd think there was a better method of moving lightning considering Life Drain already has the function, but I believe Lightning was added rather late to the WE.

Alternatively, if you only need one point to move you could create dummy units with Life drain and use them to create your lightning effects.
 

Endless_Trev

New Member
Reaction score
5
I dont know much about giving lightning differing heights, but I know you can create a dummy unit with a flying height, and attach the lightning to that unit. It will appear to be elevated.
 

Ayanami

칼리
Reaction score
288
I dont know much about giving lightning differing heights, but I know you can create a dummy unit with a flying height, and attach the lightning to that unit. It will appear to be elevated.

If you attach the Lightning by triggers, it will still remain at ground level. You'll need to use a flying dummy unit to cast a lightning based spell to produce this effect.
 

Endless_Trev

New Member
Reaction score
5
Mmk well I always did use chain lightning on the dummy, just assumed it'd be the same for trigger created lightning effects. Weird.
 

Ayanami

칼리
Reaction score
288
Mmk well I always did use chain lightning on the dummy, just assumed it'd be the same for trigger created lightning effects. Weird.

Well for triggers, it doesn't create the effect on the units. It creates the effects on a start and end point. Thus, you'll need to specify the X, Y and Z. This can be done in JASS.
 

G00dG4m3

New Member
Reaction score
1
Ok, I have found the answer by looking spells w/ lightning effects.
The code is smt like this:
Trigger:
  • call MoveLightningEx(udg_Lightning, true, udg_SomeReal[1], udg_SomeReal[2], udg_SomeReal[3], udg_SomeReal[4], udg_SomeReal[5], udg_SomeRea[6])


I should add to D4RKG4ND0LF's rep ^^
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top