home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Muzzle Flash/flare

by Klixin on 06/11/2005 18:23, 7 messages, last message: 06/17/2005 21:00, 1588 views, last view: 04/28/2024 01:20

Hi guys, im new to this engine and im workin on a mod to basically spice up the guns and models. Just a question, muzzle flare... any ideas on the best way to go about making it? ive modeled in some muzzle flare into the guns during the action animations but it looks terribly sad.. id rather use sprites like half-life. Im not much a coder, and my c++ skills are limited. So, can anyone help? anyone done this before?

Cheers guys.

   Board Index   

#1: ..

by makkE on 06/11/2005 21:42

So far, the only way you can do it without code is the way you mentioned.
It _should_ be possible to get a transparent png up there in front of the gun, but donĀ“t ask me how.. I am not a coder..as far as I know, noone has done sprites as muzzleflash until now.

reply to this message

#2: Re: ..

by Rugen on 06/16/2005 20:38, refers to #1

Cant you do an explosion in a small size you lazy Dick!

reply to this message

#3: Re: ..

by jean pierre on 06/17/2005 07:58, refers to #2

Fuck off Rugen!

reply to this message

#4: What if...

by HopFrog on 06/17/2005 17:11

we do this:

1.) Find where the bullet was launched from (hard, because of the md2 format. easier with a skeletal one) along with the direction it was lauched towards.

2.) Create a particle explosion with a few fairly large particles with a low lifetime and a random muzzle offset such that they appear for a split second and then die/vanish.

reply to this message

#5: Re: What if...

by tentus on 06/17/2005 19:21, refers to #4

perhaps the best way to handle this would be to have a cfg file in data/, for example data/weapons.cfg.

this would tell Sauer
A) where the gun is in models/
B) where the nozzle is.
C) what material should be used for nozzle flash, other related details.
D) what sounds to use from sounds/
E) what HUD icon to use (what image and where on the image)
F) how much shaking and such to use

as you can see, this kind of system would allow people to make small visual modifications without altering the source or screwing around in the packages directory. it would also allow people to work on new gun-related material much easier.

reply to this message

#6: use a sprite

by no one on 06/17/2005 20:14

Use a sprite, der. Create a transparent image using either alpha blending or color keying (alpha would look cooler) and draw one on the gun during fire. Then create a light source on the end of the gun. Particles not needed.

You should know where the gun is relative to the model because its md2, so just find the distance from the center to the end of the gun model, use s vector to calculate which was the player is facing and fire.

Note: you might want a vwep system before doing the vertex part.

reply to this message

#7: Re: use a sprite

by jean pierre on 06/17/2005 21:00, refers to #6

I agree with him/her even tough its 2D its still cool then all you night is making the light when its shoots.

reply to this message

   Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53867777 visitors requested 71642936 pages
page created in 0.021 seconds using 10 queries
hosted by Boost Digital