Electricity Gun Help?

Something I’m trying to do for a game is make a gun that shoots out a bolt of electricity. I know how to make the alpha planes and everything, but how would I go about making multiple alpha planes string together randomly over a distance? I’m not sure if I’m making sense, but does anybody have an idea for a method of doing this? Help would be really appreciated. I haven’t the slightest clue how to do this.

Personally I’d stretch one alpha plane from the gun to the target location. Either the gun acts like real lightning (IE the lightning is only visible for a fraction of a second and the player won’t be able to tell that it’s stretched) or if the gun is sustained, I’d animate the texture to flip through several lightning pictures to give an electric look, and it wouldn’t matter that it’s stretched.

You could also experiment with making the lightning texture repeatable, and scaling down the UV coordinates inversely to the object’s upscaling (so the texture remains the same global size regardless of length)

You mean something like this:
http://images2.wikia.nocookie.net/__cb20070227151316/gameblender/images/7/73/Tut_part_basic_09.png
maybe a bit longer?

See the Special Effects Tutorials. The complete tutorials result in a flame, but you can easily achive other effects. Just play with the IPOs.

I hope it helps

@Captain Oblivion: That’s one of the ways I thought about doing it, but I’m not sure of how to do that in python. Right now, I have a bunch of planes with an animated lighning texture, but I don’t like how it looks. I want to find a way to have each plane rotated randomly, so it doesn’t just go perfectly straight, if that makes sense.

@Monster: I don’t see how you could make lightning easily that way. If you could, I would think it would take lots of particles. I’m looking for a less cpu intensive way of doing this.

This is what I have:

Attachments


here is a link to some nicely done animated lightning bolts. I use them for my games.

awesome bolt

That looks more “twinkley” if you know what I mean lol. Plus, I want to make all of my own textures