Welcome, Guest! Login | Register

Rocket Launcher Colours [Print this Article]
Posted by: IoN_PuLse
Date posted: May 05 2003
User Rating: N/A
Number of views: 2392
Number of comments: 0
Description: Change them...
There’s a simple way to changing the rocket trail colours, all client side. Here’s how to do it:

Open up cg_weapons.c (located in the cgame folder of the code) Scroll down a bit and you will find the CG_RocketTrail heading. Near the bottom you will see this code:
 CODE  

  smoke = CG_SmokePuff( lastPos, up,
       wi->trailRadius,
       1, 1, 1, 0.33,
       wi->wiTrailTime,
       t,
       0,
       cgs.media.smokePuffShader );


The line that has the 1, 1, 1, 0.33, is the one we want to change. For example, change that line to:
 CODE  

1, 0, 0, 0.33,


Rocket trails will now be red! Here are some more examples:
 CODE  

0, 0, 1, 0.33, // = blue

 CODE  
0, 1, 0, 0.33, // = green


As you probably have figured out by now, the first number is the red amount, the second is the green amount and the third is the blue amount. (the forth is the alpha value, for blending) You can change these values to see all sorts of different coloured rocket trails. Here’s one that really looks cool:
 CODE  

1, 1, 0, 0.33, // = yellow


And yes, I am spelling colour with a “u” because I am Canadian.

Rate This Article
This article has not yet been rated.

You have to register to rate this article.
User Comments

No User Comments

You must register to post a comment. If you have already registered, you must login.

Latest Articles
3rd person View in Multiplayer
Half-Life 2 | Coding | Client Side Tutorials
How to enable it in HL2DM

By: cct | Nov 13 2006

Making a Camera
Half-Life 2 | Level Design
This camera is good for when you join a map, it gives you a view of the map before you join a team

By: slackiller | Mar 04 2006

Making a camera , Part 2
Half-Life 2 | Level Design
these cameras are working monitors that turn on when a button is pushed.

By: slackiller | Mar 04 2006

Storing weapons on ladder
Half-Life 2 | Coding | Snippets
like Raven Sheild or BF2

By: British_Bomber | Dec 24 2005

Implementation of a string lookup table
Half-Life 2 | Coding | Snippets
A string lookup table is a set of functions that is used to convert strings to pre-defined values

By: deathz0rz | Nov 13 2005


Latest Comments
Where do we go from here
General | News
By: MIFUNE | Jun 09 2008
 
The Input/Output system
Half-Life 2 | Level Design
By: nazitaco | Dec 23 2007
 
Where do we go from here
General | News
By: Rob_F | Nov 22 2007
 
Rescaling Half-Life
Half-Life | Coding | Shared Tutorials
By: christoph | Nov 12 2007
 
GameUI
Half-Life 2 | Coding | Client Side Tutorials
By: Evil_j | Oct 29 2007
 
3 State Zoom For Any Weapon
Half-Life 2 | Coding | Server Side Tutorials
By: Ennuified | Oct 18 2007
 
Storing weapons on ladder
Half-Life 2 | Coding | Snippets
By: cct | Sep 07 2007
 
CTF Gameplay Part 1
Half-Life | Coding | Shared Tutorials
By: DarkNight | Aug 28 2007
 
CTF Gameplay Part 1
Half-Life | Coding | Shared Tutorials
By: deedok | Aug 20 2007
 
Debugging your half-life 2 mod
Half-Life 2 | Coding | Articles
By: blackshark | Aug 17 2007
 

Site Info
296 Approved Articless
5 Pending Articles
3940 Registered Members
0 People Online (13 guests)
About - Credits - Contact Us

Wavelength version: 3.0.0.9
Valid XHTML 1.0! Valid CSS!