dim3 Forum

Full Version: Ray Colour Changing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I looked for ages and couldn't find where to set the ray's colour for the raygun?
Anybody know where to set it?
It's in the '/Projectiles/Purple Ray.js' script in the 'projectileHit();' function.
Code:
spawn.ray(sx,sz,sy,ex,ez,ey,5,1,0,1,500);
spawns the ray. If you look in the docs, you can see that it's used like this:
Code:
ray(x,z,y,x2,z2,y2,width,[b]r,g,b,[/b]lifeMilliSec);
r, g and b define the color. In the Purple Ray script they are set to 1,0,1, which means 1 red, 0 green, 1 blue, so the beam is purple (red and blue). If you set them to 1,1,0 it will be yellow, 0,1,0 will be green and 1,1,1 will be white. 0.5,0.5,0.5 will be gray, and so on.
Reference URL's