Game Development Community

Muzzle flash Question

by Bryce Kaminsky · in General Discussion · 08/07/2004 (9:45 pm) · 3 replies

I was wondering if anyone knows how to get muzzle flashes to work for weapons. I know its coded in already i just dont know how to script it in.

Please Help me...

i have one working but it sticks around for a long time ... way to long ...its using a particle effect.

#1
08/07/2004 (10:21 pm)
Currently, gun muzzle flashes are done via particles -- A state called "stateEmitter" will start an emitter going.

If you're talking about the particles staying around too long, why not adjust "stateEmitterTime," making it shorter so the particles aren't being emitted for so long? You can also adjust the lifetime of the particles in the particle datablocks.

Currently, I do muzzle flashes by making them a part of the model. The mesh is hidden, until the "fire" sequence is played and then the visibility is toggled on for a frame or two. The mesh is transparent with the addative flag, and it looks pretty good.
#2
08/08/2004 (10:16 am)
In most game engines,isnt the muzzle point just an area to make a sequence of 2 or 3 textures display?
#3
08/08/2004 (12:26 pm)
When I was trying out muzzle flashes, I used a texture that had an alpha layer and animated it into the fire sequence.

This worked great, except that it looked shit from a sideview.
So I incorporated a resource found here on GG that enables sprites that can be "rotated". Problem here was that when someone was facing some lower FPS, the textures wouldn't paint and it just looked dull.

Haven't got particle systems to work as muzzle yet :/