Author Topic: Projectile Trail + useEmitterColors  (Read 653 times)

Is it possible to make a projectile's trail (e.g. Radio Wave, not Gun Bullet) change to a color-shift I can provide instead of the one on the particles? The Radio Wave Trail emitter has "useEmitterColors" set to true - it works on bricks and mounted images but I can't change this on the actual spawned projectiles.
« Last Edit: July 23, 2009, 03:56:27 AM by Space Guy »

I think the particle emitter object needs to have it's own specified color array in order to work with useEmitterColors, since that function simply takes the object's color array (if it has one) and overrides the array in the particleData datablock. It's the same functional deal with useEmitterSizes.

How you specify that array on a Shape object, I have no idea. It could be derived from the texture but then again if the object has multiple textures that wouldn't be feasible at all.

For bricks, it takes the paint colour and for a weapon image takes the color-shift. I was thinking that a similar thing might happen with projectiles where I could spawn one with a specific variable set to change the colour of its emitter, but the ones I tried didn't work. ("color", "colorShiftColor")

You could try giving inserting a color array in the projectileData and see whether that works

Something like

Code: [Select]
colors[0] = 1 0 0 1.0;
colors[1] = 0 1 0 1.0;
colors[2] = 0 0 1 1.0;
colors[3] = 0 0 1 0.0;

Ideally I was thinking of having it possible to change per-projectile rather than per-projectiledata. I'll try that and see if it works, though. (it'll save some datablocks at least)

EDIT: Doesn't seem to work when editing the projectile (onadd) or the projectiledata.
« Last Edit: July 23, 2009, 03:00:15 PM by Space Guy »