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.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top