thunder and lightning : effect tips

BlitzMax Forums/BlitzMax Beginners Area/thunder and lightning : effect tips

DannyD(Posted 2006) [#1]
I hoping to implement lightning in my project. Not a lightning strike but a white flash that fills the black screen momentarily. Not sure where to start, any tips?

Thanks in advance


Dreamora(Posted 2006) [#2]
I would use lightblend and a white image, thats color I set from black to white and back with large steps to get it "flashy" enough.


DannyD(Posted 2006) [#3]
Thanks for the info, anyone got some lightblend examples ?


tonyg(Posted 2006) [#4]
samples/birdie/misc/lightimage


DannyD(Posted 2006) [#5]
Ah yes, right under my nose.Thanks a lot.


tonyg(Posted 2006) [#6]
Might be close to what you want...
Graphics 640,480
image:TImage=LoadImage("max.png")
While Not KeyHit(KEY_ESCAPE)
  Cls
  DrawImage image,0,0
  If MouseDown(1)
	  SetBlend lightblend
 	  SetAlpha 0.6
	  DrawRect 0,0,640,480
  	  SetBlend maskblend
      SetAlpha 1.0
  EndIf
Flip
Wend



Dreamora(Posted 2006) [#7]
Why SetAlpha without Alphablend?
Is Alpha used on LightBlend?


DannyD(Posted 2006) [#8]
Thanks nice Tony, Thanks.


tonyg(Posted 2006) [#9]

Is Alpha used on LightBlend?


yes