PDA

View Full Version : disruptor beam


JK Legacy
06-05-2002, 03:10 PM
how could I change the appearance of the beam of the disruptor primary fire? I've tried looking for it myself but i'm not very experienced with this, and have had no look :/

i'm just looking to change the colour of the beam, width of the beam, time it stays on screen etc.

thx

JK Legacy
06-08-2002, 09:10 AM
anyone?

I understand that everyone is still getting used to jk2 coding.. but if anyone has any vague ideas or clues they could give me, it'd be appreciated.

Subject452
06-08-2002, 09:33 AM
just change the color of the picture associated with the weapon

Wiebbe
06-08-2002, 10:19 AM
just change the color of the picture associated with the weapon

Not sure if that will work though, The disruptor just like the rail gun in Quake3, isnt a picture, but a code, (or mathemathic function or something) ( this is what i think it is. no sure) so i guess it is hardcoded.
no idea where though.

check out some of the railgun tutorials, they might give ya an idea.

Subject452
06-08-2002, 10:29 AM
can be, i havent looked at the code :)

JK Legacy
06-08-2002, 10:40 AM
I think i've found the bit of code that draws the line, but I got little experience with C :(

{
syscall( CG_FX_ADDLINE, start, end, PASSFLOAT(size1), PASSFLOAT(size2), PASSFLOAT(sizeParm),
PASSFLOAT(alpha1), PASSFLOAT(alpha2), PASSFLOAT(alphaParm),
sRGB, eRGB, PASSFLOAT(rgbParm),
killTime, shader, flags);
}

thats the thingy that it calls to draw the line, and the current values its passin to it is

trap_FX_AddLine( start, end, 0.1f, 6.0f, 0.0f,
1.0f, 0.0f, 0.0f,
WHITE, WHITE, 0.0f,
150, trap_R_RegisterShader( "gfx/effects/redLine" ),
FX_SIZE_LINEAR | FX_ALPHA_LINEAR );

i think its a combination of code and the redLine image, i'll have to play around with it, too complicated for me though :/

Subject452
06-08-2002, 10:48 AM
look in the shader file: gfx/effects/redLine, there is redLine defined, in that piece there should allso be a pic. refs.

Tchouky
06-08-2002, 10:49 AM
it s the line_cap.efx file in the
asset0.pk3
in effects/dirsruptor

these efx files are loaded and contains the particularities of the affects...

the line_cap is :

// disruptor line cap

Particle
{
life 300

size
{
start 6
end 2
flags linear
}

rgb
{
start 1.0 0.3 0.1
}

alpha
{
start 1.0
end 0.0
flags linear
}

rotation -90 90

shaders
[
gfx/effects/whiteFlare
]
}

Particle
{
life 300

size
{
start 1
}

alpha
{
start 1.0
end 0.0
flags linear
}

rotation -90 90

shaders
[
gfx/effects/whiteFlare
]
}


you need to change the rgb start ...
rgb
{
start 1.0 0.3 0.1
}

1.0 0.3 0.1 is red try to change it to that :

0.1 0.2 1.0
you should have blue now ....

JK Legacy
06-08-2002, 02:24 PM
thx tchouky, but I found that the code I posted was actually the code for the beam. for some reason it takes the redline img and then lets u apply a tint or whatever it is to it, and the alpha stuff n things. I can't understand why they didnt just use a white img in the first place like they did for the code you pasted (whiteflare). i think thats just for either the muzzle flash when you fire the beam, as that wasnt changed when i modified the beam colour or it could be the mark thats left on the wall, i'll have to find out.

thx ppl