HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Lightning - Modifying Opacity

09-15-2009, 04:35 PM#1
Fulla
Basically have made a spell involving lightning & trying to improve the visuals of the actual lightning streams themselves.

How do you make it say 50% opacity. I tried both of these but it led to the lightning simply becoming invisible:

Collapse JASS:
call SetLightningColor( lightning, 255, 255, 255, 255 )
call SetLightningColor( lightning, 255, 255, 255, 125 )

I thought the last one was the opacity, just like with a unit?
09-15-2009, 04:47 PM#2
Komaqtion
And it is, though I believe that the alpha integer only goes up to 100 :S

So, 50% should be this:
call SetLightningColor( lightning, 255, 255, 255, 50 )
09-15-2009, 05:10 PM#3
ToukoAozaki
Collapse common.j:
native SetLightningColor            takes lightning whichBolt, real r, real g, real b, real a returns boolean

Valid range for the parameters r,g,b,a is [0.0,1.0].
09-15-2009, 06:57 PM#4
Fulla
thx for help guys ( 1, 1, 1, 0.5 ) works perfectly.