You are using the Advanced Lightning effect and not the obsolete Lightning effect, right?
Regardless, the effect generates on the layer source regardless of masks. If you are using the most current release of After Effects, the easiest thing to do would be to paste that mask onto a different solid and then, on your lightning solid, apply the Set Matte effect, point it at the new solid and set it to use the alpha of that layer after masks and effects. If you’re using an older version of AE, the same applies except that you will need to precompose the new layer with the mask (moving all the attributes, etc. into the precomp) and point the Set Matte effect at the new layer.
I would also highly recommend removing the glow that the lightning effect creates itself and create your own glow (after the Set Matte effect). It’ll look much better (even if you weren’t needing to mask it out). See the very recent lightning tutorial at VideoCopilot.net for some great tips on getting better-looking lightning.
– The Great Szalam
(The \’Great\’ stands for \’Not So Great, in fact, Extremely Humble\’)
No trees were harmed in the creation of this message, but several thousand electrons were mildly inconvenienced.