Hi all, I have been trying to get this to work all afternoon and it's driving me crazy. can someone tell me how to alter the colour of particles? I have looked at all the script reference stuff which was not very helpful. Heres what I have got so far:
var laserColourGreen: Color = Color(45.0, 255.0, 0.0, 255.0);
var laserColourRed: Color = Color(255.0, 0.0, 0.0, 255.0);
function OnParticleCollision (particle : GameObject) {
var laserParticles = particleEmitter.particles;
if (particle.gameObject.tag == "Laser")
{
for (var i = 0; i < laserParticles.Length; i++)
{
laserParticles*.color = laserColourRed;*
*}*
*}*
*else*
*{*
_laserParticles*.color = laserColourGreen;*_
_*}*_
_*particleEmitter.particles = laserParticles;*_
_*}*_
_*```*_
_*<p>This script is attached to the particleEmitter. Any ideas?</p>*_