HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Fading Lightnings

08-05-2006, 12:25 PM#1
StockBreak
It sounds like a poetry^^, but is there a simply way to fade out a lightning (just like in-game lightnings do)? I use this:
Collapse JASS:
native SetLightningColor takes lightning whichBolt, real r, real g, real b, real a returns boolean
reducing gradually the alpha channel, but it's very annoying and moreover how does normally a lightning last (0.25 seconds)? Is there a file where I can find values for in-game lightnings (just like floating texts, such as duration, life, fading point etc...)? Any help will be appreciated, thanks.
08-05-2006, 12:57 PM#2
Wyvernoid
No built-in ones I think, but you can find something useful on wc3jass.com. In the Jass Vault pretty much was written about timed lightning.
08-05-2006, 03:11 PM#3
Naakaloh
Splats\LightningData.slk

I find using a periodic trigger or repeating timer works best for fading lightning.
08-06-2006, 09:43 AM#4
StockBreak
Quote:
Originally Posted by Naakaloh
Splats\LightningData.slk

I find using a periodic trigger or repeating timer works best for fading lightning.
Rep added. Only some more matters:

1) I don't understand some fields (actually, most^^): width? NoiseScale? TextCoordScale? Version?
2) Do they fade just after they're created (I mean they have no fade point because it's 0)?
3) Is there a way to detect a unit's "projectile xyz" and other stuff? I mean how to make a lightning match exactly a unit's scale (a great giant will have his lightning starting from a greater height)? Thank you so much.
08-06-2006, 09:50 AM#5
blu_da_noob
1) Width is simply the width of the lightning on screen.
Noise Scale is how jagged the lightning is (0 will give you something like Life Drain, higher will get you Chain Lightning)
Other two I'm not sure.
08-06-2006, 04:06 PM#6
vile
You can also use the lightning attack ability, it can fade the lightning away by setting its duration/lifetime in the object editor. That is if its a single hit.
08-06-2006, 04:14 PM#7
Naakaloh
Version is RoC (0) or TFT (1).

It seems like fade point is either how long into it's duration before it starts fading or the point in the duration to which it fades. It makes more sense to me that it would be the first.

There is a way, but you need to know what the unit's scale is ahead of time since you can't get that value with a function.
08-06-2006, 07:53 PM#8
StockBreak
Quote:
Originally Posted by blu_da_noob
1) Width is simply the width of the lightning on screen.
Noise Scale is how jagged the lightning is (0 will give you something like Life Drain, higher will get you Chain Lightning)
Other two I'm not sure.
Thanks!

Quote:
Originally Posted by Naakaloh
Version is RoC (0) or TFT (1).

It seems like fade point is either how long into it's duration before it starts fading or the point in the duration to which it fades. It makes more sense to me that it would be the first.

There is a way, but you need to know what the unit's scale is ahead of time since you can't get that value with a function.
Thank you, but there is no field called "fade" or similar... Could you please explain that way? Thanks.
08-07-2006, 12:36 AM#9
Naakaloh
The way I was talking about is probably something you've already realized; you need to figure out what the height of the lightning effect for the unit has to be, store it in your map somehow before running, and reference it whenever you need to create lightning for that unit.